Spaces:
Sleeping
Sleeping
Download Dockerfile from SyedShaheer/voice-task-backend: direct link, hf CLI and curl.
- Browser
- Download file 598 Bytes
-
https://huggingface.co/spaces/SyedShaheer/voice-task-backend/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/SyedShaheer/voice-task-backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/SyedShaheer/voice-task-backend/resolve/main/Dockerfile
598 Bytes
| # Use a lightweight Python image | |
| FROM python:3.11-slim | |
| # Set the working directory inside the container | |
| WORKDIR /app | |
| # Copy the requirements file first to leverage Docker caching | |
| COPY requirements.txt . | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of your application code | |
| COPY . . | |
| # Hugging Face Spaces specifically listens on port 7860 | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # Start the FastAPI app using uvicorn | |
| # We use 0.0.0.0 so it's accessible outside the container | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |