Sofia Casadei commited on
Commit
ddd255d
·
1 Parent(s): abd4f63

install flash attention

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -3
Dockerfile CHANGED
@@ -13,8 +13,10 @@ COPY --from=uv /uv /uv
13
  RUN apt-get update && \
14
  apt-get upgrade -y && \
15
  apt-get install -y --no-install-recommends \
16
- python3.11 python3.11-venv python3-pip ffmpeg && \
17
- apt-get clean && \
 
 
18
  rm -rf /var/lib/apt/lists/*
19
 
20
  # Create virtual environment with uv
@@ -47,7 +49,11 @@ COPY --chown=user requirements.txt .
47
 
48
  # Install Python packages with uv caching
49
  RUN --mount=type=cache,target=$UV_CACHE_DIR,uid=1000,gid=1000 \
50
- /uv pip install -r requirements.txt
 
 
 
 
51
 
52
  # Install flash-attn
53
  RUN --mount=type=cache,target=$UV_CACHE_DIR,uid=1000,gid=1000 \
 
13
  RUN apt-get update && \
14
  apt-get upgrade -y && \
15
  apt-get install -y --no-install-recommends \
16
+ python3.11 python3.11-venv python3-pip ffmpeg \
17
+ build-essential \
18
+ git \
19
+ && apt-get clean && \
20
  rm -rf /var/lib/apt/lists/*
21
 
22
  # Create virtual environment with uv
 
49
 
50
  # Install Python packages with uv caching
51
  RUN --mount=type=cache,target=$UV_CACHE_DIR,uid=1000,gid=1000 \
52
+ /uv pip install --no-cache-dir -r requirements.txt
53
+
54
+ # Install build dependencies for flash-attn
55
+ RUN --mount=type=cache,target=$UV_CACHE_DIR,uid=1000,gid=1000 \
56
+ /uv pip install -U --no-cache-dir setuptools wheel ninja packaging
57
 
58
  # Install flash-attn
59
  RUN --mount=type=cache,target=$UV_CACHE_DIR,uid=1000,gid=1000 \