File size: 707 Bytes
276fb54 f7e9534 3a91b41 b69c008 01c75f4 276fb54 f7e9534 b69c008 276fb54 b69c008 276fb54 f7e9534 b69c008 e13fc27 6b5af3e 276fb54 27f4406 3a91b41 b69c008 f7e9534 276fb54 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# Use official lightweight Python image
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy project
COPY . .
# Expose port
EXPOSE 8000
# Default HuggingFace token (You can override it on `docker run`)
ENV HF_TOKEN=your_token_here
# Start Uvicorn server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|