| FROM python:3.11-slim |
|
|
| ENV PYTHONDONTWRITEBYTECODE=1 \ |
| PYTHONUNBUFFERED=1 \ |
| PIP_NO_CACHE_DIR=1 \ |
| PORT=7860 \ |
| PYTHONPATH=/app/backend:/app |
|
|
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| build-essential \ |
| curl \ |
| libgl1 \ |
| libglib2.0-0 \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| COPY requirements.txt ./requirements.txt |
| RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt |
|
|
| |
| COPY backend ./backend |
| COPY simulation ./simulation |
| COPY start_hf_services.sh ./start_hf_services.sh |
|
|
| RUN mkdir -p /app/backend/uploads /app/backend/reports |
| RUN chmod +x /app/start_hf_services.sh |
|
|
| EXPOSE 7860 |
|
|
| CMD ["/app/start_hf_services.sh"] |
|
|