Spaces:
Runtime error
Runtime error
Download Dockerfile from samyak152002/pdf-annotator-fastapi: direct link, hf CLI and curl.
- Browser
- Download file 665 Bytes
-
https://huggingface.co/spaces/samyak152002/pdf-annotator-fastapi/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/samyak152002/pdf-annotator-fastapi/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/samyak152002/pdf-annotator-fastapi/resolve/main/Dockerfile
665 Bytes
| # Dockerfile | |
| # Use the official Python image from the Docker Hub | |
| FROM python:3.10-slim | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED=1 | |
| # Create a working directory | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy the requirements file | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the application code, including templates | |
| COPY app /app/app | |
| # Expose port 8000 for the API | |
| EXPOSE 8000 | |
| # Command to run the application | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] |