hadokenvskikoken commited on
Commit
b577472
·
verified ·
1 Parent(s): a0324a4

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies (for transformers)
6
+ RUN apt-get update && apt-get install -y \
7
+ git \
8
+ gcc \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Install Python dependencies
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy code
16
+ COPY . .
17
+
18
+ # Expose port (must match Hugging Face's default: 7860)
19
+ EXPOSE 7860
20
+
21
+ # Run the API
22
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]