366degrees commited on
Commit
952c5bd
·
verified ·
1 Parent(s): cac966c

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +22 -0
  2. requirements.txt +8 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ---------- SNP-Universal-Embedding Deployment ----------
2
+ FROM python:3.10-slim
3
+
4
+ # Prevent interactive prompts
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+ WORKDIR /app
7
+
8
+ # Copy everything in your repo (model files, api_inference.py, etc.)
9
+ COPY . .
10
+
11
+ # Install system & Python dependencies
12
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Expose the FastAPI / Uvicorn default port
16
+ EXPOSE 7860
17
+
18
+ # Healthcheck route expected by HF Endpoints
19
+ HEALTHCHECK CMD curl --fail http://localhost:7860/health || exit 1
20
+
21
+ # Run your inference script
22
+ CMD ["python", "api_inference.py"]
requirements.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ torch==2.8.0
2
+ transformers==4.31.0
3
+ sentence-transformers==2.2.2
4
+ fastapi
5
+ uvicorn
6
+ numpy
7
+ scikit-learn
8
+