Spaces:
Paused
Paused
Commit
·
34614a7
1
Parent(s):
08f4fb8
fix the bug of environment variables
Browse files- Dockerfile +2 -3
- get_flash_attn.py +1 -1
Dockerfile
CHANGED
@@ -34,9 +34,8 @@ 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 |
-
RUN python /code/get_flash_attn.py
|
38 |
-
|
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
|
|
|
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 FLASH_ATTN_VER=$(python /code/get_flash_attn.py) && \
|
38 |
+
pip3 install "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.2.post1/${FLASH_ATTN_VER}" --no-cache-dir
|
|
|
39 |
|
40 |
# Set the working directory to the user's home directory
|
41 |
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(f"
|
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"{filename}")
|
58 |
except Exception as e:
|
59 |
print("Error generating filename:", e)
|