File size: 952 Bytes
dffa8c2 420f7bc dffa8c2 420f7bc dffa8c2 420f7bc dffa8c2 420f7bc | 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 34 35 36 37 38 39 40 41 42 43 | FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PYTHONPATH=/code \
PORT=7860
WORKDIR /code
# Minimal system deps for common Python packages in this app.
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies directly (no requirements file in this folder).
RUN pip install --no-cache-dir \
fastapi \
"uvicorn[standard]" \
sqlalchemy \
psycopg2-binary \
redis \
celery \
pydantic-settings \
python-jose \
bcrypt \
aiofiles \
python-multipart \
email-validator \
google-genai \
opencv-python-headless
# Copy app package so imports like "from app..." keep working.
COPY . /code/app
EXPOSE 7860
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|