Soumya79's picture
Update Dockerfile
6f976de verified
raw
history blame contribute delete
583 Bytes
FROM python:3.11-slim-bookworm
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV DOCKER=1
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
COPY wsgi.py .
COPY init_db.py .
COPY train_model.py .
COPY templates/ ./templates/
COPY static/ ./static/
RUN mkdir -p /app/temp
RUN python train_model.py
EXPOSE 7860
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "wsgi:app"]