Spaces:
Sleeping
Sleeping
Download Dockerfile from rasmodev/income_prediction_FastAPI: direct link, hf CLI and curl.
- Browser
- Download file 703 Bytes
-
https://huggingface.co/spaces/rasmodev/income_prediction_FastAPI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/rasmodev/income_prediction_FastAPI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/rasmodev/income_prediction_FastAPI/resolve/main/Dockerfile
703 Bytes
| # Use the official Python image as a parent image | |
| FROM python:3.11.3-slim | |
| # Set the working directory within the container | |
| WORKDIR /app | |
| # Copy the requirements.txt file into the container | |
| COPY ./requirements.txt /app/requirements.txt | |
| # Install the Python dependencies | |
| RUN pip install -r /app/requirements.txt | |
| # Copy your FastAPI application code into the container | |
| COPY ./main.py /app/main.py | |
| # Copy the model and key components into the container | |
| COPY ./model_and_key_components.pkl /app/model_and_key_components.pkl | |
| # Expose port 7860 for the FastAPI application | |
| EXPOSE 7860 | |
| # Define the command to run your FastAPI application | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |