goodgoals commited on
Commit
3cf5419
·
verified ·
1 Parent(s): 202d9ae

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -0
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a high-performance CUDA base image
2
+ FROM nvidia/cuda:12.1.0-devel-ubuntu22.04
3
+
4
+ # Set environment variables for non-interactive installs
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Install Python and essential build tools
9
+ RUN apt-get update && apt-get install -y \
10
+ python3-pip \
11
+ python3-dev \
12
+ git \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Upgrade pip and install wheel
16
+ RUN pip3 install --no-cache-dir --upgrade pip wheel
17
+
18
+ # Install Unsloth and its core dependencies
19
+ # We use the specific install command recommended for CUDA 12.1
20
+ RUN pip3 install --no-cache-dir \
21
+ "unsloth[colab-new] @ git+https://github.com" \
22
+ --extra-index-url https://download.pytorch.org
23
+
24
+ # Install TRL and Transformers for the Trainer subclassing
25
+ RUN pip3 install --no-cache-dir trl transformers accelerate datasets
26
+
27
+ # Set the working directory
28
+ WORKDIR /app
29
+
30
+ # Copy your custom logic into the container
31
+ COPY . /app
32
+
33
+ # The entrypoint to start training
34
+ CMD ["python3", "train.py"]