Spaces:
Paused
Paused
Download Dockerfile from arcticaurora/filetest: direct link, hf CLI and curl.
- Browser
- Download file 682 Bytes
-
https://huggingface.co/spaces/arcticaurora/filetest/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/arcticaurora/filetest/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/arcticaurora/filetest/resolve/main/Dockerfile
682 Bytes
| FROM python:3.10-slim | |
| # Install basic utilities | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Create directory for files | |
| RUN mkdir -p /app/files | |
| # Create user to avoid running as root (similar to your main app) | |
| RUN useradd -m -u 1000 user | |
| # Change ownership of directories | |
| RUN chown -R user:user /app | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| ENV PYTHONUNBUFFERED=1 | |
| # Install dependencies | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY --chown=user . . | |
| # Run the application | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |