Spaces:
Running
Running
Commit
·
5b833b9
1
Parent(s):
9c2d626
fixed the docker
Browse files- Dockerfile +9 -3
- requirements.txt +8 -6
Dockerfile
CHANGED
|
@@ -3,14 +3,20 @@ FROM python:3.10-slim
|
|
| 3 |
# Set working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
# Copy only necessary files
|
| 7 |
COPY requirements.txt ./
|
| 8 |
COPY app/ ./app/
|
| 9 |
COPY README.md ./
|
| 10 |
|
| 11 |
-
# Install dependencies
|
| 12 |
-
RUN pip install --no-cache-dir --upgrade pip \
|
| 13 |
-
|
|
|
|
| 14 |
|
| 15 |
# Expose port for uvicorn
|
| 16 |
EXPOSE 8000
|
|
|
|
| 3 |
# Set working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Install system dependencies
|
| 7 |
+
RUN apt-get update && apt-get install -y \
|
| 8 |
+
curl \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
+
|
| 11 |
# Copy only necessary files
|
| 12 |
COPY requirements.txt ./
|
| 13 |
COPY app/ ./app/
|
| 14 |
COPY README.md ./
|
| 15 |
|
| 16 |
+
# Install dependencies with verbose output and error handling
|
| 17 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
| 18 |
+
pip install --no-cache-dir --verbose torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu && \
|
| 19 |
+
pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
# Expose port for uvicorn
|
| 22 |
EXPOSE 8000
|
requirements.txt
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
-
fastapi
|
| 2 |
-
uvicorn
|
| 3 |
-
transformers
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
fastapi>=0.68.0
|
| 2 |
+
uvicorn>=0.15.0
|
| 3 |
+
transformers>=4.11.0
|
| 4 |
+
Pillow>=8.3.1
|
| 5 |
+
python-multipart>=0.0.5
|
| 6 |
+
numpy>=1.21.0
|
| 7 |
+
tqdm>=4.62.0
|
| 8 |
+
requests>=2.26.0
|