listen2you commited on
Commit
e6b895f
·
1 Parent(s): c41b22c

fix flash-attn version

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -2
  2. get_flash_attn.py +1 -1
Dockerfile CHANGED
@@ -34,8 +34,9 @@ ENV HOME=/home/user \
34
 
35
  RUN pip3 install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121
36
  RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
37
- ARG DYNAMIC_PARAMS=$(python3 /code/get_flash_attn.py)
38
- RUN pip3 install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.2.post1/${DYNAMIC_PARAMS}
 
39
 
40
  # Set the working directory to the user's home directory
41
  WORKDIR $HOME/app
 
34
 
35
  RUN pip3 install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121
36
  RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
37
+ RUN python /code/get_flash_attn.py > url.txt
38
+ RUN source ./url.txt
39
+ RUN pip3 install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.2.post1/${FLASH_ATTN_VER} --no-cache-dir
40
 
41
  # Set the working directory to the user's home directory
42
  WORKDIR $HOME/app
get_flash_attn.py CHANGED
@@ -54,6 +54,6 @@ def generate_flash_attn_filename(flash_attn_version="2.7.2.post1"):
54
  if __name__ == "__main__":
55
  try:
56
  filename = generate_flash_attn_filename()
57
- print(filename)
58
  except Exception as e:
59
  print("Error generating filename:", e)
 
54
  if __name__ == "__main__":
55
  try:
56
  filename = generate_flash_attn_filename()
57
+ print(f"FLASH_ATTN_VER={filename}")
58
  except Exception as e:
59
  print("Error generating filename:", e)