simulations / Dockerfile.hfspaces
tiffank1802
Add Django simulation server with Docker config
b42075e
raw
history blame contribute delete
530 Bytes
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
ENV HF_HUB_DISABLE_XDG=1
WORKDIR /root/bookshop
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
COPY simulationserver/requirements.txt .
RUN pip install --no-cache-dir -r simulationserver/requirements.txt
COPY . .
RUN python manage.py migrate --run-syncdb 2>/dev/null || true
EXPOSE 7860
CMD ["sh", "-c", "python manage.py runserver 0.0.0.0:7860"]