Spaces:
Sleeping
Sleeping
Download Dockerfile from mtyrrell/chatfed_generator: direct link, hf CLI and curl.
- Browser
- Download file 837 Bytes
-
https://huggingface.co/spaces/mtyrrell/chatfed_generator/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/mtyrrell/chatfed_generator/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mtyrrell/chatfed_generator/resolve/main/Dockerfile
837 Bytes
| # ---------- Base Image ---------- | |
| FROM python:3.11-slim | |
| # ---------- Environment Variables ---------- | |
| ENV PYTHONUNBUFFERED=1 \ | |
| OMP_NUM_THREADS=1 \ | |
| TOKENIZERS_PARALLELISM=false | |
| # ---------- Create Non-Root User ---------- | |
| # Ensures proper file permissions for dev and runtime | |
| RUN useradd -m -u 1000 user | |
| # ---------- Set Working Directory ---------- | |
| WORKDIR /app | |
| # ---------- Install Python Dependencies ---------- | |
| # Copy requirements and install as non-root user | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # ---------- Copy Project Files ---------- | |
| # Set appropriate ownership and permissions | |
| COPY --link --chown=1000 . . | |
| # ---------- Expose Application Port ---------- | |
| EXPOSE 7860 | |
| # ---------- Default Command ---------- | |
| # Launch app via module path | |
| CMD ["python", "app.py"] | |