Spaces:
No application file
No application file
Update Dockerfile
Browse files- Dockerfile +4 -2
Dockerfile
CHANGED
|
@@ -24,9 +24,11 @@ RUN pip install --no-cache-dir --upgrade pip && \
|
|
| 24 |
pillow \
|
| 25 |
requests
|
| 26 |
|
| 27 |
-
# Tạo stub module flash_attn
|
| 28 |
RUN mkdir -p /usr/local/lib/python3.10/site-packages/flash_attn && \
|
| 29 |
-
printf "def _not_available(*args, **kwargs):\n raise ImportError('flash_attn is not available in this CPU-only build')\n\n__all__ = ['_not_available']\n" > /usr/local/lib/python3.10/site-packages/flash_attn/__init__.py
|
|
|
|
|
|
|
| 30 |
|
| 31 |
COPY app.py /app/app.py
|
| 32 |
|
|
|
|
| 24 |
pillow \
|
| 25 |
requests
|
| 26 |
|
| 27 |
+
# Tạo stub module flash_attn và bitsandbytes để tránh lỗi trên môi trường CPU-only
|
| 28 |
RUN mkdir -p /usr/local/lib/python3.10/site-packages/flash_attn && \
|
| 29 |
+
printf "def _not_available(*args, **kwargs):\n raise ImportError('flash_attn is not available in this CPU-only build')\n\n__all__ = ['_not_available']\n" > /usr/local/lib/python3.10/site-packages/flash_attn/__init__.py && \
|
| 30 |
+
mkdir -p /usr/local/lib/python3.10/site-packages/bitsandbytes && \
|
| 31 |
+
printf \"raise ImportError('bitsandbytes is not available in this CPU-only build')\n\" > /usr/local/lib/python3.10/site-packages/bitsandbytes/__init__.py
|
| 32 |
|
| 33 |
COPY app.py /app/app.py
|
| 34 |
|