Spaces:
Sleeping
Sleeping
Download Dockerfile from DiddiAkash/deepfake-application: direct link, hf CLI and curl.
- Browser
- Download file 871 Bytes
-
https://huggingface.co/spaces/DiddiAkash/deepfake-application/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/DiddiAkash/deepfake-application/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/DiddiAkash/deepfake-application/resolve/main/Dockerfile
871 Bytes
| FROM python:3.10-slim | |
| # Set up a new user named "user" with user ID 1000 | |
| RUN useradd -m -u 1000 user | |
| # Set environment variables | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONUNBUFFERED=1 \ | |
| PORT=7860 | |
| # Set the working directory | |
| WORKDIR $HOME/app | |
| # Install system dependencies required for OpenCV | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy the requirements file and install dependencies | |
| COPY --chown=user backend/requirements.txt $HOME/app/backend/requirements.txt | |
| RUN pip install --no-cache-dir -r $HOME/app/backend/requirements.txt | |
| # Copy the rest of the application | |
| COPY --chown=user . $HOME/app | |
| # Switch to the non-root user | |
| USER user | |
| # Expose the port that Hugging Face Spaces uses | |
| EXPOSE 7860 | |
| # Run the FastAPI server | |
| CMD ["python", "backend/server.py"] | |