Update Dockerfile
Browse files- Dockerfile +11 -10
Dockerfile
CHANGED
@@ -1,13 +1,14 @@
|
|
1 |
-
FROM
|
2 |
-
|
|
|
|
|
|
|
|
|
3 |
WORKDIR /code
|
4 |
-
|
5 |
-
COPY ./requirements.txt /code/requirements.txt
|
6 |
-
|
7 |
-
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
-
|
9 |
COPY . .
|
|
|
|
|
|
|
|
|
10 |
|
11 |
-
EXPOSE 7860
|
12 |
-
|
13 |
-
CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
+
FROM ubuntu
|
2 |
+
# 设置环境变量,避免交互式配置
|
3 |
+
ARG DEBIAN_FRONTEND=noninteractive
|
4 |
+
# 设置时区为亚洲/上海
|
5 |
+
ENV TZ=Asia/Shanghai
|
6 |
+
# 设置工作目录为/app
|
7 |
WORKDIR /code
|
|
|
|
|
|
|
|
|
|
|
8 |
COPY . .
|
9 |
+
# 安装所需的软件包并清理APT缓存
|
10 |
+
# 下载并执行 install.sh 脚本
|
11 |
+
RUN wget -O install.sh https://dl.xp.cn/dl/xp/install.sh && \
|
12 |
+
bash install.sh
|
13 |
|
14 |
+
EXPOSE 7860
|
|
|
|