pacman1337 commited on
Commit
770c390
·
verified ·
1 Parent(s): 4f28289

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -12
Dockerfile CHANGED
@@ -1,27 +1,21 @@
1
- FROM nvidia/cuda:12.1.0-devel-ubuntu22.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
- # HF_TOKEN will be set via Space Secrets
5
 
6
- RUN apt-get update && apt-get install -y \
7
- python3 python3-pip git curl \
8
- && rm -rf /var/lib/apt/lists/*
9
 
10
  WORKDIR /app
11
 
12
- # Install dependencies
13
- RUN pip3 install --no-cache-dir \
14
- torch>=2.4.0 \
15
  transformers>=4.46.0 \
16
  datasets>=3.0.0 \
17
  peft>=0.13.0 \
18
  trl>=0.12.0 \
19
  bitsandbytes>=0.44.0 \
20
  accelerate>=1.0.0 \
21
- huggingface_hub>=0.26.0 \
22
- flash-attn --no-build-isolation
23
 
24
  COPY train.py /app/train.py
25
 
26
- # Run training on startup
27
- CMD ["python3", "train.py"]
 
1
+ FROM pytorch/pytorch:2.4.0-cuda12.1-cudnn9-devel
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
 
4
 
5
+ RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
 
 
6
 
7
  WORKDIR /app
8
 
9
+ # Install dependencies (no flash-attn, use sdpa instead)
10
+ RUN pip install --no-cache-dir \
 
11
  transformers>=4.46.0 \
12
  datasets>=3.0.0 \
13
  peft>=0.13.0 \
14
  trl>=0.12.0 \
15
  bitsandbytes>=0.44.0 \
16
  accelerate>=1.0.0 \
17
+ huggingface_hub>=0.26.0
 
18
 
19
  COPY train.py /app/train.py
20
 
21
+ CMD ["python", "train.py"]