Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
|
@@ -8,8 +8,9 @@ WORKDIR /code
|
|
| 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 |
-
#
|
| 15 |
-
|
|
|
|
|
|
| 8 |
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 10 |
|
| 11 |
+
# 複製其餘程式碼 (包含 main.py)
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
+
# ✨ 關鍵修正:將 "main.py" 改為 "main:app"
|
| 15 |
+
# "main" 代表檔案 main.py,"app" 代表您在程式裡寫的 app = FastAPI()
|
| 16 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|