Lowking commited on
Commit
e8136e1
·
verified ·
1 Parent(s): 265ef70

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -0
Dockerfile ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用官方 Python 環境
2
+ FROM python:3.10
3
+
4
+ # 設定工作目錄
5
+ WORKDIR /code
6
+
7
+ # 複製並安裝套件
8
+ COPY ./requirements.txt /code/requirements.txt
9
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
+
11
+ # 複製其餘程式碼
12
+ COPY . .
13
+
14
+ # 啟動伺服器 (注意:HF 規定 Port 必須是 7860)
15
+ CMD ["uvicorn", "main.py", "--host", "0.0.0.0", "--port", "7860"]