Update Dockerfile
Browse files- Dockerfile +7 -5
Dockerfile
CHANGED
|
@@ -30,6 +30,7 @@ WORKDIR /app
|
|
| 30 |
|
| 31 |
# Upgrade pip and install core dependencies first
|
| 32 |
RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel packaging ninja
|
|
|
|
| 33 |
|
| 34 |
# Install PyTorch with CUDA 11.8 support
|
| 35 |
RUN pip install --no-cache-dir \
|
|
@@ -38,11 +39,8 @@ RUN pip install --no-cache-dir \
|
|
| 38 |
torchaudio==2.1.2 \
|
| 39 |
--index-url https://download.pytorch.org/whl/cu118
|
| 40 |
|
| 41 |
-
# Install flash-attn
|
| 42 |
-
RUN pip install --no-cache-dir
|
| 43 |
-
einops==0.7.0 \
|
| 44 |
-
triton==2.1.0 \
|
| 45 |
-
&& pip install --no-cache-dir flash-attn==2.3.3 --no-build-isolation
|
| 46 |
|
| 47 |
# Copy and install remaining requirements
|
| 48 |
COPY requirements.txt .
|
|
@@ -57,4 +55,8 @@ RUN useradd -m -u 1000 user && \
|
|
| 57 |
|
| 58 |
USER user
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
CMD ["uvicorn", "download_api:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 30 |
|
| 31 |
# Upgrade pip and install core dependencies first
|
| 32 |
RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel packaging ninja
|
| 33 |
+
RUN pip install --no-cache-dir "numpy<2"
|
| 34 |
|
| 35 |
# Install PyTorch with CUDA 11.8 support
|
| 36 |
RUN pip install --no-cache-dir \
|
|
|
|
| 39 |
torchaudio==2.1.2 \
|
| 40 |
--index-url https://download.pytorch.org/whl/cu118
|
| 41 |
|
| 42 |
+
# Install flash-attn with compatible version
|
| 43 |
+
RUN pip install --no-cache-dir flash-attn==2.3.3 --no-build-isolation
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
# Copy and install remaining requirements
|
| 46 |
COPY requirements.txt .
|
|
|
|
| 55 |
|
| 56 |
USER user
|
| 57 |
|
| 58 |
+
# Set environment variable to suppress HuggingFace warnings
|
| 59 |
+
ENV HF_HUB_DISABLE_PROGRESS=1
|
| 60 |
+
ENV TF_CPP_MIN_LOG_LEVEL=3
|
| 61 |
+
|
| 62 |
CMD ["uvicorn", "download_api:app", "--host", "0.0.0.0", "--port", "7860"]
|