ST-THOMAS-OF-AQUINAS commited on
Commit
addf87d
·
verified ·
1 Parent(s): cf6d004

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -12
Dockerfile CHANGED
@@ -1,18 +1,18 @@
1
- FROM python:3.9-slim
 
2
 
 
3
  WORKDIR /app
4
 
5
- RUN apt-get update && apt-get install -y git
6
-
7
- # Copy files
8
- COPY app.py /app/
9
- COPY author_svms.pkl /app/
10
- COPY label_map.pkl /app/
11
- COPY requirements.txt /app/
12
-
13
- # Install dependencies
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- EXPOSE 5000
 
 
 
 
17
 
18
- CMD ["python", "app.py"]
 
 
1
+ # Base image
2
+ FROM python:3.11-slim
3
 
4
+ # Set work directory
5
  WORKDIR /app
6
 
7
+ # Copy requirements and install
8
+ COPY requirements.txt .
 
 
 
 
 
 
 
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
+ # Copy app code
12
+ COPY app.py .
13
+
14
+ # Expose API port
15
+ EXPOSE 7860
16
 
17
+ # Command to run FastAPI
18
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]