Rafs-an09002 commited on
Commit
c970b1d
·
verified ·
1 Parent(s): a3ed31f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +36 -0
Dockerfile ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Nexus-Nano Inference - Ultra Lightweight
2
+ # Minimal footprint for maximum speed
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
+ RUN ls -lh /app/models/nexus_nano.onnx
27
+
28
+ EXPOSE 7860
29
+
30
+ ENV PYTHONUNBUFFERED=1
31
+ ENV OMP_NUM_THREADS=2
32
+
33
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
34
+ CMD curl -f http://localhost:7860/health || exit 1
35
+
36
+ CMD ["python", "app.py"]