Spaces:
Sleeping
Sleeping
Download Dockerfile from Yanbo2/Compute-and-Token-Watch: direct link, hf CLI and curl.
- Browser
- Download file 547 Bytes
-
https://huggingface.co/spaces/Yanbo2/Compute-and-Token-Watch/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Yanbo2/Compute-and-Token-Watch/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Yanbo2/Compute-and-Token-Watch/resolve/main/Dockerfile
547 Bytes
| FROM python:3.9-slim-buster | |
| WORKDIR /app | |
| # Install cron | |
| RUN apt-get update && apt-get install -y cron | |
| # Copy application files | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Give execution rights to the script | |
| RUN chmod +x gpu_info_collector.sh | |
| COPY crontab_job /etc/cron.d/crontab_job | |
| # Give execution rights on the cron job | |
| RUN chmod 0644 /etc/cron.d/crontab_job | |
| # Apply cron job | |
| RUN crontab /etc/cron.d/crontab_job | |
| # Start cron in the background and run the Python app | |
| CMD cron && python app.py | |