Spaces:
Sleeping
Sleeping
Download Dockerfile from moathA/tarist-web: direct link, hf CLI and curl.
- Browser
- Download file 639 Bytes
-
https://huggingface.co/spaces/moathA/tarist-web/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/moathA/tarist-web/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/moathA/tarist-web/resolve/main/Dockerfile
639 Bytes
| FROM python:3.10-slim | |
| # Set environment variables | |
| ENV PYTHONDONTWRITEBYTECODE 1 | |
| ENV PYTHONUNBUFFERED 1 | |
| # Set work directory | |
| WORKDIR /app | |
| # Create instance directory with correct permissions | |
| RUN mkdir -p /app/instance && chmod 777 /app/instance | |
| # Install dependencies | |
| COPY requirements.txt /app/ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy project | |
| COPY . /app/ | |
| # Ensure all files are owned by user 1000 (HF default) | |
| RUN chown -R 1000:1000 /app | |
| # Switch to non-root user | |
| USER 1000 | |
| # Port for Hugging Face Spaces | |
| EXPOSE 7860 | |
| # Run the app | |
| CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"] | |