Spaces:
Sleeping
Sleeping
Download Dockerfile from mohitlahoti2002/djangoServer: direct link, hf CLI and curl.
- Browser
- Download file 678 Bytes
-
https://huggingface.co/spaces/mohitlahoti2002/djangoServer/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/mohitlahoti2002/djangoServer/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mohitlahoti2002/djangoServer/resolve/main/Dockerfile
678 Bytes
| FROM python:3.11 | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN curl -LsSf https://astral.sh/uv/install.sh | sh | |
| ENV PATH="/root/.local/bin:$PATH" | |
| COPY pyproject.toml uv.lock ./ | |
| RUN uv sync --frozen --no-cache | |
| # IMPORTANT: ensure .venv apps are used before system | |
| ENV PATH="/app/.venv/bin:$PATH" | |
| COPY . . | |
| RUN mkdir -p /app/staticfiles_build /app/static /app/media /app/uploads | |
| RUN chmod -R 777 /app/staticfiles_build /app/static /app/media /app/uploads | |
| EXPOSE 7860 | |
| CMD ["sh", "-c", "python manage.py collectstatic --noinput && gunicorn djangoServer.wsgi:application --workers 2 --bind 0.0.0.0:7860"] | |