| FROM python:3.11-slim |
|
|
| ENV PYTHONDONTWRITEBYTECODE=1 \ |
| PYTHONUNBUFFERED=1 \ |
| PIP_NO_CACHE_DIR=1 \ |
| PYTHONPATH=/code \ |
| PORT=7860 |
|
|
| WORKDIR /code |
|
|
| |
| 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/* |
|
|
| |
| 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 . /code/app |
|
|
| EXPOSE 7860 |
|
|
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|