longjava2024 commited on
Commit
530c260
·
verified ·
1 Parent(s): 685a70e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 để thoả mãn yêu cầu import của model mà không cần CUDA
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 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