Spaces:
Paused
Paused
Upload 7 files
Browse files- Dockerfile.fallback +6 -2
- requirements.txt +3 -3
Dockerfile.fallback
CHANGED
|
@@ -9,10 +9,14 @@ WORKDIR /app
|
|
| 9 |
# Install hanya curl untuk health check (essential)
|
| 10 |
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
-
# Copy requirements dan install Python dependencies
|
| 13 |
COPY requirements.txt .
|
|
|
|
|
|
|
|
|
|
| 14 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 15 |
-
pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 16 |
pip cache purge
|
| 17 |
|
| 18 |
# Copy aplikasi
|
|
|
|
| 9 |
# Install hanya curl untuk health check (essential)
|
| 10 |
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
+
# Copy requirements dan install Python dependencies with fallback
|
| 13 |
COPY requirements.txt .
|
| 14 |
+
COPY requirements-flexible.txt .
|
| 15 |
+
|
| 16 |
+
# Try main requirements first, fallback to flexible if needed
|
| 17 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 18 |
+
(pip install --no-cache-dir -r requirements.txt || \
|
| 19 |
+
pip install --no-cache-dir -r requirements-flexible.txt) && \
|
| 20 |
pip cache purge
|
| 21 |
|
| 22 |
# Copy aplikasi
|
requirements.txt
CHANGED
|
@@ -5,11 +5,11 @@
|
|
| 5 |
fastapi==0.104.1
|
| 6 |
uvicorn[standard]==0.24.0
|
| 7 |
|
| 8 |
-
# ML/AI dependencies -
|
| 9 |
onnxruntime==1.15.1
|
| 10 |
-
opencv-python-headless==4.
|
| 11 |
numpy==1.24.3
|
| 12 |
-
pillow==
|
| 13 |
|
| 14 |
# Utility libraries - Minimal yang diperlukan
|
| 15 |
pyyaml==6.0.1
|
|
|
|
| 5 |
fastapi==0.104.1
|
| 6 |
uvicorn[standard]==0.24.0
|
| 7 |
|
| 8 |
+
# ML/AI dependencies - Confirmed available versions from PyPI
|
| 9 |
onnxruntime==1.15.1
|
| 10 |
+
opencv-python-headless==4.8.0.76
|
| 11 |
numpy==1.24.3
|
| 12 |
+
pillow==10.0.1
|
| 13 |
|
| 14 |
# Utility libraries - Minimal yang diperlukan
|
| 15 |
pyyaml==6.0.1
|