Jack698 commited on
Commit
43de962
·
verified ·
1 Parent(s): 999e2d0

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. Dockerfile +20 -0
  2. README.md +11 -10
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用官方 Python 运行时作为父镜像
2
+ FROM python:3.9-slim
3
+
4
+ # 先更新包列表,然后安装 git。
5
+ # --no-install-recommends 可以减少不必要的包安装,保持镜像体积较小。
6
+ # 最后清理 apt 缓存,这是减小镜像大小的好习惯。
7
+ RUN apt-get update && \
8
+ apt-get install -y git --no-install-recommends && \
9
+ rm -rf /var/lib/apt/lists/*
10
+
11
+ # 设置工作目录
12
+ WORKDIR /app
13
+
14
+ # 克隆仓库内容到当前目录,然后安装 Python 依赖
15
+ # 使用 && 链接命令,确保它们在同一个镜像层中按顺序执行
16
+ RUN git clone https://github.com/ZyphrZero/z.ai2api_python.git . \
17
+ && pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
18
+
19
+ # 容器启动时运行 main.py
20
+ CMD ["python", "main.py"]
README.md CHANGED
@@ -1,10 +1,11 @@
1
- ---
2
- title: Zaipy33
3
- emoji: 🌖
4
- colorFrom: indigo
5
- colorTo: purple
6
- sdk: docker
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
+ ---
2
+ title: Zaipy
3
+ emoji: 🏢
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: docker
7
+ pinned: false
8
+ app_port: 8080
9
+ ---
10
+
11
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference