Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +15 -5
Dockerfile
CHANGED
|
@@ -1,29 +1,39 @@
|
|
| 1 |
-
# Nexus-Nano Inference -
|
| 2 |
-
#
|
| 3 |
|
| 4 |
FROM python:3.10-slim
|
| 5 |
|
| 6 |
WORKDIR /app
|
| 7 |
|
|
|
|
| 8 |
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
| 9 |
|
|
|
|
| 10 |
COPY requirements.txt .
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
|
|
|
| 13 |
RUN mkdir -p /app/models
|
| 14 |
|
|
|
|
| 15 |
COPY app.py .
|
| 16 |
|
| 17 |
# Download Nexus-Nano model
|
| 18 |
RUN python -c "from huggingface_hub import hf_hub_download; \
|
|
|
|
| 19 |
hf_hub_download( \
|
| 20 |
repo_id='GambitFlow/Nexus-Nano', \
|
| 21 |
filename='nexus_nano.onnx', \
|
| 22 |
local_dir='/app/models', \
|
| 23 |
local_dir_use_symlinks=False \
|
| 24 |
-
)
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
EXPOSE 7860
|
| 29 |
|
|
|
|
| 1 |
+
# Nexus-Nano Inference - Fixed Build
|
| 2 |
+
# Ultra Lightweight
|
| 3 |
|
| 4 |
FROM python:3.10-slim
|
| 5 |
|
| 6 |
WORKDIR /app
|
| 7 |
|
| 8 |
+
# System dependencies
|
| 9 |
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
# Python dependencies
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
+
# Create models folder BEFORE download
|
| 16 |
RUN mkdir -p /app/models
|
| 17 |
|
| 18 |
+
# Copy application
|
| 19 |
COPY app.py .
|
| 20 |
|
| 21 |
# Download Nexus-Nano model
|
| 22 |
RUN python -c "from huggingface_hub import hf_hub_download; \
|
| 23 |
+
print('Downloading Nexus-Nano model...'); \
|
| 24 |
hf_hub_download( \
|
| 25 |
repo_id='GambitFlow/Nexus-Nano', \
|
| 26 |
filename='nexus_nano.onnx', \
|
| 27 |
local_dir='/app/models', \
|
| 28 |
local_dir_use_symlinks=False \
|
| 29 |
+
); \
|
| 30 |
+
print('Download complete!')"
|
| 31 |
+
|
| 32 |
+
# Verify model exists
|
| 33 |
+
RUN ls -lh /app/models/ && \
|
| 34 |
+
test -f /app/models/nexus_nano.onnx && \
|
| 35 |
+
echo "✅ Model file verified" || \
|
| 36 |
+
(echo "❌ Model file missing!" && exit 1)
|
| 37 |
|
| 38 |
EXPOSE 7860
|
| 39 |
|