Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +6 -0
Dockerfile
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9-slim # 使用轻量级基础镜像
|
2 |
+
WORKDIR /app
|
3 |
+
COPY requirements.txt .
|
4 |
+
RUN pip install --no-cache-dir -r requirements.txt # 无缓存安装依赖
|
5 |
+
COPY . .
|
6 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] # 暴露端口 7860
|