Spaces:
Build error
Build error
Download Dockerfile from DeepTrainers/Rpg-Model-Tuning: direct link, hf CLI and curl.
- Browser
- Download file 802 Bytes
-
https://huggingface.co/spaces/DeepTrainers/Rpg-Model-Tuning/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/DeepTrainers/Rpg-Model-Tuning/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/DeepTrainers/Rpg-Model-Tuning/resolve/main/Dockerfile
802 Bytes
| FROM python:3.12-slim-bookworm | |
| # Create app user and directory | |
| RUN useradd -m appuser && \ | |
| mkdir /app && \ | |
| chown appuser:appuser /app | |
| WORKDIR /app | |
| # Install build dependencies and git, clone repo (keeping build dependencies) | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends git gcc python3-dev && \ | |
| git clone https://github.com/SeoulDroid99100/MangaBot/tree/master . && \ | |
| pip install --no-cache-dir -r requirements.txt && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Switch to appuser and set up virtual environment | |
| USER appuser | |
| RUN python -m venv venv | |
| ENV PATH="/app/venv/bin:$PATH" | |
| # Create log directory with write permissions | |
| USER root | |
| RUN mkdir -p /app/logs && chmod 777 /app/logs | |
| USER appuser | |
| # Run from module | |
| CMD ["sh", "-c", "python web.py & python main.py"] |