huyhoang04 commited on
Commit
4b5f59a
·
verified ·
1 Parent(s): 3da607c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -19
Dockerfile CHANGED
@@ -1,19 +1,15 @@
1
- FROM python:3.12-slim
2
-
3
- WORKDIR /app
4
-
5
- COPY requirements.txt .
6
- RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
7
- RUN pip install --no-cache-dir -r requirements.txt
8
-
9
- COPY . .
10
-
11
- # Make port configurable via environment variable
12
- ENV PORT=8000
13
-
14
- # Expose the port
15
- EXPOSE $PORT
16
-
17
- # Use environment variable for port
18
- CMD python -m uvicorn app.main:app --host 0.0.0.0 --port $PORT
19
-
 
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY requirements.txt .
6
+ RUN pip install --no-cache-dir -r requirements.txt
7
+
8
+ COPY . .
9
+
10
+ # Sử dụng port 7860 (port mặc định của Hugging Face)
11
+ ENV PORT=7860
12
+ EXPOSE $PORT
13
+
14
+ # Chạy ứng dụng
15
+ CMD python -m uvicorn app.main:app --host 0.0.0.0 --port $PORT