InfinaPromptBattle / Dockerfile
argeinfina's picture
Fix static files in HF Space with WhiteNoise and collectstatic
ea5ebd3 verified
raw
history blame contribute delete
443 Bytes
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
COPY . /app
EXPOSE 7860
CMD ["sh", "-c", "python manage.py migrate && python manage.py collectstatic --noinput && python manage.py ensure_provider_credentials && python manage.py ensure_app_user && python manage.py runserver 0.0.0.0:${PORT:-7860}"]