Spaces:
Runtime error
Runtime error
Download Dockerfile from arsh1101/ecoguardModelpyy: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/spaces/arsh1101/ecoguardModelpyy/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/arsh1101/ecoguardModelpyy/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/arsh1101/ecoguardModelpyy/resolve/main/Dockerfile
1.03 kB
| # Use an official Python runtime as a parent image | |
| FROM python:3.9-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create the configuration directory | |
| RUN mkdir -p /deforestation_percentage_image_api/.config/sentinelhub | |
| # Change ownership of the configuration directory | |
| # RUN chown -R arsh1101:arsh1101 /deforestation_percentage_image_api/.config # Ensure the user has ownership of the config directory | |
| # Set the working directory in the container | |
| WORKDIR /deforestation_percentage_image_api | |
| # Copy the requirements.txt into the container | |
| COPY requirements.txt ./requirements.txt | |
| # Install any dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the current directory contents into the container | |
| COPY . . | |
| # Expose the port FastAPI runs on | |
| EXPOSE 8000 | |
| # Command to run the FastAPI app using Uvicorn | |
| CMD ["uvicorn", "deforestation_percenatge_image_api:app", "--host", "0.0.0.0", "--port", "8000"] | |