Spaces:
Runtime error
Runtime error
Download Dockerfile from Chittrarasu/embedding_FastAPI: direct link, hf CLI and curl.
- Browser
- Download file 524 Bytes
-
https://huggingface.co/spaces/Chittrarasu/embedding_FastAPI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Chittrarasu/embedding_FastAPI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Chittrarasu/embedding_FastAPI/resolve/main/Dockerfile
524 Bytes
| # Use official Python base image | |
| FROM python:3.11-slim | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy all files to the container | |
| COPY . /app | |
| # Set HF_HOME to use an accessible cache directory | |
| ENV HF_HOME=/app/.cache | |
| RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r Requirements.txt | |
| # Expose port (Hugging Face uses port 7860 by default) | |
| EXPOSE 7860 | |
| # Run the FastAPI server using uvicorn | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |