Spaces:
Runtime error
Runtime error
Download Dockerfile from junaidte14/django-admin-dashboard: direct link, hf CLI and curl.
- Browser
- Download file 875 Bytes
-
https://huggingface.co/spaces/junaidte14/django-admin-dashboard/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/junaidte14/django-admin-dashboard/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/junaidte14/django-admin-dashboard/resolve/main/Dockerfile
875 Bytes
| FROM python:3.11-slim | |
| # Install system utilities, compilation tools, and PostgreSQL libraries | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| gcc \ | |
| build-essential \ | |
| python3-dev \ | |
| libpq-dev \ | |
| && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ | |
| && apt-get install -y nodejs \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /workspace | |
| # Copy dependencies first to maximize layer caching efficiency | |
| COPY requirements.txt . | |
| # Upgrade pip and install the requirements file | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy everything else from your root folder | |
| COPY . . | |
| # Environment settings required for Django/Gunicorn runtime | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PORT=7860 | |
| # Enforce execution permissions on the entrypoint script | |
| RUN chmod +x setup.sh | |
| EXPOSE 7860 | |
| CMD ["./setup.sh"] |