Rafs-an09002 commited on
Commit
826638c
·
verified ·
1 Parent(s): f3450d1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -20
Dockerfile CHANGED
@@ -1,39 +1,22 @@
1
- # Nexus-Core Inference - Fixed for Manual Model Upload
2
- # HF Spaces CPU (2 vCPU, 16GB RAM)
3
-
4
  FROM python:3.10-slim
5
 
6
  WORKDIR /app
7
 
8
- # System dependencies
9
- RUN apt-get update && apt-get install -y \
10
- build-essential \
11
- curl \
12
- && rm -rf /var/lib/apt/lists/*
13
 
14
- # Python dependencies first (for caching)
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # Copy application code
19
  COPY app.py .
20
  COPY engine/ ./engine/
21
 
22
- # Model is already uploaded to /app/models/ by HF Spaces
23
- # Just verify it exists at runtime
24
- # No download needed!
25
-
26
  EXPOSE 7860
27
 
28
- # Environment variables
29
  ENV PYTHONUNBUFFERED=1
30
  ENV OMP_NUM_THREADS=2
31
- ENV MKL_NUM_THREADS=2
32
- ENV ONNXRUNTIME_EXECUTION_MODE=sequential
33
 
34
- # Health check
35
- HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
36
  CMD curl -f http://localhost:7860/health || exit 1
37
 
38
- # Run application
39
  CMD ["python", "app.py"]
 
1
+ # Nexus-Core Inference - Path Fixed
 
 
2
  FROM python:3.10-slim
3
 
4
  WORKDIR /app
5
 
6
+ RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
 
 
 
 
7
 
 
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
 
11
  COPY app.py .
12
  COPY engine/ ./engine/
13
 
 
 
 
 
14
  EXPOSE 7860
15
 
 
16
  ENV PYTHONUNBUFFERED=1
17
  ENV OMP_NUM_THREADS=2
 
 
18
 
19
+ HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
 
20
  CMD curl -f http://localhost:7860/health || exit 1
21
 
 
22
  CMD ["python", "app.py"]