Download Dockerfile from triflix/uploader: direct link, hf CLI and curl.
- Browser
- Download file 683 Bytes
-
https://huggingface.co/spaces/triflix/uploader/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/triflix/uploader/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/triflix/uploader/resolve/main/Dockerfile
683 Bytes
| # Use a lightweight Python base image | |
| FROM python:3.9-slim | |
| # Set the working directory inside the container | |
| WORKDIR /code | |
| # Copy the requirements file first to leverage Docker layer caching | |
| COPY ./requirements.txt /code/requirements.txt | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Copy the entire 'app' directory into the container | |
| COPY ./app /code/app | |
| # Expose the port the app will run on (Hugging Face Spaces default) | |
| EXPOSE 7860 | |
| # Command to run the application using uvicorn | |
| # --host 0.0.0.0 makes the server accessible from outside the container | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |