Spaces:
Build error
Build error
Download Dockerfile from goodgoals/BetterTrainer: direct link, hf CLI and curl.
- Browser
- Download file 990 Bytes
-
https://huggingface.co/spaces/goodgoals/BetterTrainer/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/goodgoals/BetterTrainer/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/goodgoals/BetterTrainer/resolve/main/Dockerfile
990 Bytes
| # Use a high-performance CUDA base image | |
| FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 | |
| # Set environment variables for non-interactive installs | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| ENV PYTHONUNBUFFERED=1 | |
| # Install Python and essential build tools | |
| RUN apt-get update && apt-get install -y \ | |
| python3-pip \ | |
| python3-dev \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Upgrade pip and install wheel | |
| RUN pip3 install --no-cache-dir --upgrade pip wheel | |
| # Install Unsloth and its core dependencies | |
| # We use the specific install command recommended for CUDA 12.1 | |
| RUN pip3 install --no-cache-dir \ | |
| "unsloth[colab-new] @ git+https://github.com" \ | |
| --extra-index-url https://download.pytorch.org | |
| # Install TRL and Transformers for the Trainer subclassing | |
| RUN pip3 install --no-cache-dir trl transformers accelerate datasets | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy your custom logic into the container | |
| COPY . /app | |
| # The entrypoint to start training | |
| CMD ["python3", "train.py"] | |