Spaces:
Running
Running
Create Dockerfile
Browse files- Dockerfile +31 -0
Dockerfile
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9-slim
|
2 |
+
|
3 |
+
# 使用腾讯云加速alpine(如不需要,可以删除这一行)
|
4 |
+
RUN sed -i 's/deb.debian.org/mirrors.cloud.tencent.com/g' /etc/apt/sources.list
|
5 |
+
|
6 |
+
# 安装必要的依赖
|
7 |
+
RUN apt-get update && apt-get install -y git
|
8 |
+
|
9 |
+
WORKDIR /app
|
10 |
+
|
11 |
+
# 复制必要的文件
|
12 |
+
COPY merged2upload.py /app/merged2upload.py
|
13 |
+
COPY entrypoint.sh /app/entrypoint.sh
|
14 |
+
|
15 |
+
# 设置执行权限
|
16 |
+
RUN chmod +x /app/entrypoint.sh
|
17 |
+
|
18 |
+
# 安装Python依赖
|
19 |
+
RUN pip install requests PyYAML tqdm -i https://mirrors.cloud.tencent.com/pypi/simple
|
20 |
+
|
21 |
+
# 设置环境变量(这些将在HuggingFace后台设置)
|
22 |
+
ENV GITHUB_TOKEN=""
|
23 |
+
ENV GITHUB_GIST_ID=""
|
24 |
+
ENV PROXY=""
|
25 |
+
ENV GIT_CLONE_PROXY=""
|
26 |
+
|
27 |
+
# 暴露8080端口
|
28 |
+
EXPOSE 8080
|
29 |
+
|
30 |
+
# 设置入口点
|
31 |
+
ENTRYPOINT ["/app/entrypoint.sh"]
|