Rayugacodes commited on
Commit
36344b2
·
verified ·
1 Parent(s): 9894974

Fix: install PyTorch with CUDA 12.1 support

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -1
Dockerfile CHANGED
@@ -11,12 +11,15 @@ ENV TORCHINDUCTOR_CACHE_DIR=/tmp/torch_cache
11
  ENV XDG_CACHE_HOME=/tmp/cache
12
  ENV HOME=/tmp/home
13
  ENV USER=user
 
14
 
15
  RUN mkdir -p /tmp/hf_cache /tmp/torch_cache /tmp/cache /tmp/home && \
16
  chmod -R 777 /tmp/hf_cache /tmp/torch_cache /tmp/cache /tmp/home
17
 
 
 
 
18
  RUN pip3 install --no-cache-dir \
19
- torch \
20
  transformers \
21
  trl \
22
  peft \
 
11
  ENV XDG_CACHE_HOME=/tmp/cache
12
  ENV HOME=/tmp/home
13
  ENV USER=user
14
+ ENV PYTHONUNBUFFERED=1
15
 
16
  RUN mkdir -p /tmp/hf_cache /tmp/torch_cache /tmp/cache /tmp/home && \
17
  chmod -R 777 /tmp/hf_cache /tmp/torch_cache /tmp/cache /tmp/home
18
 
19
+ # Install PyTorch with CUDA 12.1 support explicitly
20
+ RUN pip3 install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cu121
21
+
22
  RUN pip3 install --no-cache-dir \
 
23
  transformers \
24
  trl \
25
  peft \