benstaf commited on
Commit
186f9e0
·
verified ·
1 Parent(s): 204abf4

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -0
Dockerfile ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Set the working directory inside the container
4
+ WORKDIR /code
5
+
6
+ # Copy and install dependencies
7
+ COPY requirements.txt .
8
+ RUN pip install --no-cache-dir --upgrade pip && \
9
+ pip install --no-cache-dir -r requirements.txt
10
+
11
+ # Copy the FastAPI app code
12
+ COPY app.py .
13
+
14
+ # Start the FastAPI server using Uvicorn (on port 7860, required by HF)
15
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]