Novoo5 commited on
Commit
1b7f4cb
·
verified ·
1 Parent(s): fc46562

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # Create user for HuggingFace Spaces
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV PATH="/home/user/.local/bin:$PATH"
7
+ ENV PYTHONPATH="/app"
8
+
9
+ WORKDIR /app
10
+
11
+ # Copy requirements first (Docker layer caching)
12
+ COPY --chown=user ./requirements.txt requirements.txt
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy entire project
16
+ COPY --chown=user . /app
17
+
18
+ # HuggingFace Spaces port
19
+ EXPOSE 7860
20
+
21
+ # Start CardioQA API
22
+ CMD ["python", "src/api/main.py"]