Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +8 -4
Dockerfile
CHANGED
|
@@ -12,20 +12,24 @@ RUN apt-get update && apt-get install -y \
|
|
| 12 |
RUN useradd -m -u 1000 user
|
| 13 |
WORKDIR /app
|
| 14 |
|
| 15 |
-
# Install Python dependencies
|
| 16 |
RUN pip install --no-cache-dir --upgrade pip && \
|
|
|
|
| 17 |
pip install --no-cache-dir \
|
| 18 |
torch \
|
| 19 |
-
torchvision \
|
|
|
|
|
|
|
| 20 |
git+https://github.com/huggingface/transformers \
|
| 21 |
accelerate \
|
| 22 |
qwen-vl-utils[decord]==0.0.8 \
|
| 23 |
fastapi \
|
| 24 |
uvicorn[standard] \
|
| 25 |
python-multipart \
|
| 26 |
-
autoawq \
|
| 27 |
pillow \
|
| 28 |
-
pydantic
|
|
|
|
|
|
|
| 29 |
|
| 30 |
# Copy application files
|
| 31 |
COPY --chown=user:user . /app
|
|
|
|
| 12 |
RUN useradd -m -u 1000 user
|
| 13 |
WORKDIR /app
|
| 14 |
|
| 15 |
+
# Install Python dependencies in stages
|
| 16 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 17 |
+
# Install PyTorch first
|
| 18 |
pip install --no-cache-dir \
|
| 19 |
torch \
|
| 20 |
+
torchvision && \
|
| 21 |
+
# Then install other dependencies
|
| 22 |
+
pip install --no-cache-dir \
|
| 23 |
git+https://github.com/huggingface/transformers \
|
| 24 |
accelerate \
|
| 25 |
qwen-vl-utils[decord]==0.0.8 \
|
| 26 |
fastapi \
|
| 27 |
uvicorn[standard] \
|
| 28 |
python-multipart \
|
|
|
|
| 29 |
pillow \
|
| 30 |
+
pydantic && \
|
| 31 |
+
# Finally install autoawq
|
| 32 |
+
pip install --no-cache-dir autoawq
|
| 33 |
|
| 34 |
# Copy application files
|
| 35 |
COPY --chown=user:user . /app
|