Download Dockerfile from VishwaK03/Error-Driven-Learning-Reinforcement-Engine: direct link, hf CLI and curl.
- Browser
- Download file 659 Bytes
-
https://huggingface.co/spaces/VishwaK03/Error-Driven-Learning-Reinforcement-Engine/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/VishwaK03/Error-Driven-Learning-Reinforcement-Engine/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/VishwaK03/Error-Driven-Learning-Reinforcement-Engine/resolve/main/Dockerfile
659 Bytes
| # Use a lightweight Python image | |
| FROM python:3.10-slim | |
| # Set the working directory inside the cloud server | |
| WORKDIR /app | |
| # Install 'unzip' utility on the Linux server | |
| RUN apt-get update && apt-get install -y unzip | |
| # Copy the requirements file and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all your backend files (including model.zip) | |
| COPY . . | |
| # Unzip the model and remove the zip file to save space! | |
| RUN unzip model.zip -d ./ && rm model.zip | |
| # Hugging Face Spaces require port 7860 | |
| EXPOSE 7860 | |
| # The command to start your FastAPI server | |
| CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"] |