Download Dockerfile from navpan2/sarva-api: direct link, hf CLI and curl.
- Browser
- Download file 528 Bytes
-
https://huggingface.co/spaces/navpan2/sarva-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/navpan2/sarva-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/navpan2/sarva-api/resolve/main/Dockerfile
528 Bytes
| # Use the official Python image as a base | |
| FROM python:3.10 | |
| # Set the working directory | |
| WORKDIR /app | |
| # Install the required packages | |
| RUN pip install tensorflow fastapi uvicorn requests pillow python-multipart | |
| # Copy the FastAPI application code into the container | |
| COPY . . | |
| # Expose the required port for FastAPI (you may choose any available port, e.g., 7860 for compatibility with Hugging Face Spaces) | |
| EXPOSE 7860 | |
| # Run the FastAPI application with uvicorn | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |