Spaces:
Running
Running
Download Dockerfile from codey-lab/Universal-AI-Hub: direct link, hf CLI and curl.
- Browser
- Download file 955 Bytes
-
https://huggingface.co/spaces/codey-lab/Universal-AI-Hub/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/codey-lab/Universal-AI-Hub/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/codey-lab/Universal-AI-Hub/resolve/main/Dockerfile
955 Bytes
| # Use an official Python runtime as a parent image. | |
| # We choose a slim version to keep the image size small. | |
| FROM python:3.10-slim | |
| # Set the working directory in the container. | |
| # All subsequent commands will be executed in this directory. | |
| WORKDIR /app | |
| # Copy the requirements file into the container. | |
| # We do this first to leverage Docker's layer caching. | |
| # If requirements.txt doesn't change, this step is skipped. | |
| COPY requirements.txt ./ | |
| # Install any needed packages specified in requirements.txt. | |
| # The --no-cache-dir flag helps to keep the image smaller. | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application code into the working directory. | |
| COPY . . | |
| # Expose the hub port (matches HUB_PORT in app/.pyfun) | |
| EXPOSE 7860 | |
| # Define the command to run your application. | |
| # This command will be executed when the container starts. | |
| # We use main.py as the entry point, as per our architecture. | |
| CMD ["python", "main.py"] | |