Tantawi commited on
Commit
1239ef5
·
verified ·
1 Parent(s): 22a70b4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -2
Dockerfile CHANGED
@@ -1,10 +1,18 @@
1
- FROM tensorflow/tensorflow:2.10.0-gpu
 
2
 
 
3
  WORKDIR /app
4
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  COPY app/ ./app/
9
 
10
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
1
+ # Use a CPU-based Python image compatible with Hugging Face
2
+ FROM python:3.8-slim
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
 
7
+ # Copy and install dependencies
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
+ # Copy your app
12
  COPY app/ ./app/
13
 
14
+ # Expose the default port
15
+ EXPOSE 7860
16
+
17
+ # Run FastAPI with Uvicorn
18
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]