Spaces:
Runtime error
Runtime error
Download Dockerfile from Princess3/python: direct link, hf CLI and curl.
- Browser
- Download file 901 Bytes
-
https://huggingface.co/spaces/Princess3/python/resolve/3cb70332d4e010ae233f67514ead05dc6a717ffd/Dockerfile
- Command line
-
hf download hf://spaces/Princess3/python@3cb70332d4e010ae233f67514ead05dc6a717ffd/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Princess3/python/resolve/3cb70332d4e010ae233f67514ead05dc6a717ffd/Dockerfile
901 Bytes
| # Use the official Python 3.12 image as a base | |
| FROM python:3.12-slim | |
| # Set environment variables to prevent Python from writing .pyc files and buffering stdout/stderr | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| git \ | |
| wget \ | |
| curl \ | |
| unzip \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create a working directory | |
| WORKDIR /app | |
| # Install Python dependencies | |
| RUN pip install --upgrade pip | |
| RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | |
| RUN pip install transformers accelerate requests psutil | |
| # Copy the current directory contents into the container at /app | |
| COPY . /app | |
| # Unzip the data.zip file into the /app/data directory | |
| RUN unzip data.zip -d /app/data | |
| # Set the default command to run when starting the container | |
| CMD ["python", "m3.py"] |