Bennie12 commited on
Commit
641c2ff
·
verified ·
1 Parent(s): 4591e93

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -0
Dockerfile ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10
2
+
3
+ # 設定工作目錄
4
+ WORKDIR /code
5
+
6
+ # 複製 requirements.txt 並安裝套件
7
+ COPY requirements.txt .
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
+
10
+ # 複製所有專案檔案
11
+ COPY . .
12
+
13
+ # 啟動 FastAPI
14
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]