Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +6 -3
Dockerfile
CHANGED
|
@@ -14,12 +14,15 @@ WORKDIR $HOME/app
|
|
| 14 |
# Copy the requirements file
|
| 15 |
COPY --chown=user:user ./requirements.txt .
|
| 16 |
|
| 17 |
-
# --- BUILD FIX ---
|
| 18 |
-
# 1. Upgrade pip itself and install the key build-time
|
|
|
|
| 19 |
RUN pip install --no-cache-dir --upgrade pip setuptools
|
| 20 |
RUN pip install --no-cache-dir packaging
|
|
|
|
| 21 |
|
| 22 |
-
# 2. Now, install all the other requirements.
|
|
|
|
| 23 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 24 |
|
| 25 |
# Copy the rest of the application
|
|
|
|
| 14 |
# Copy the requirements file
|
| 15 |
COPY --chown=user:user ./requirements.txt .
|
| 16 |
|
| 17 |
+
# --- BUILD FIX v3 ---
|
| 18 |
+
# 1. Upgrade pip itself and install the key build-time dependencies first.
|
| 19 |
+
# flash-attn needs 'packaging' AND 'torch' to build itself.
|
| 20 |
RUN pip install --no-cache-dir --upgrade pip setuptools
|
| 21 |
RUN pip install --no-cache-dir packaging
|
| 22 |
+
RUN pip install --no-cache-dir torch==2.1.2
|
| 23 |
|
| 24 |
+
# 2. Now, install all the other requirements.
|
| 25 |
+
# pip will use the already-installed torch and not try to reinstall it.
|
| 26 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 27 |
|
| 28 |
# Copy the rest of the application
|