Spaces:
Runtime error
Runtime error
Download Dockerfile from Amrender/Medical-API-Backend: direct link, hf CLI and curl.
- Browser
- Download file 584 Bytes
-
https://huggingface.co/spaces/Amrender/Medical-API-Backend/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Amrender/Medical-API-Backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Amrender/Medical-API-Backend/resolve/main/Dockerfile
584 Bytes
| # Use an official lightweight Python/CUDA image | |
| FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04 | |
| # Install Python and pip | |
| RUN apt-get update && apt-get install -y python3-pip python3-dev && rm -rf /var/lib/apt/lists/* | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy the requirements and install them | |
| COPY requirements.txt . | |
| RUN pip3 install --no-cache-dir -r requirements.txt | |
| # Copy your application code | |
| COPY app.py . | |
| # Expose the Hugging Face Space port | |
| EXPOSE 7860 | |
| # Command to run the FastAPI server using Uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |