Spaces:
Sleeping
Sleeping
File size: 593 Bytes
b42075e 009ae8c b42075e dc24671 b42075e bbc670f 009ae8c | 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 | FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
ENV HF_SPACES=true
WORKDIR /root/bookshop
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN python manage.py migrate --run-syncdb 2>/dev/null || true
RUN python manage.py init_simulation_methods 2>/dev/null || true
EXPOSE 7860
# Disable Celery completely on HF Spaces
CMD ["python", "manage.py", "runserver", "0.0.0.0:7860"]
|