wbteve commited on
Commit
ec2a545
·
verified ·
1 Parent(s): ea89b70

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -12
Dockerfile CHANGED
@@ -1,12 +1,13 @@
1
- # 使用 EasyTier 作为基础
2
- FROM easytier/easytier:latest
3
- # 切换回 root 安装必要工具
4
- #USER root
5
- #RUN apt-get update && apt-get install -y ca-certificates
6
- # 强制指定 HF 要求的 7860 端口(虽然 EasyTier 不一定用它,但应用启动需要)
7
- EXPOSE 7860
8
- # 必须以非 root 运行(HF 规范)
9
- #RUN useradd -m -u 1000 user
10
- #USER user
11
- # 启动时避免使用 TUN 设备
12
- CMD ["/easytier-core", "-i", "10.12.1.2", "--proxy", "socks5://0.0.0.0:7860"]
 
 
1
+ FROM python:3.9
2
+
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
6
+
7
+ WORKDIR /app
8
+
9
+ COPY --chown=user ./requirements.txt requirements.txt
10
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
+
12
+ COPY --chown=user . /app
13
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]