bobocup commited on
Commit
9df5492
·
verified ·
1 Parent(s): e2cb105

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -19
Dockerfile CHANGED
@@ -1,18 +1,4 @@
1
- FROM ubuntu:latest
2
-
3
- # 避免交互式提示
4
- ENV DEBIAN_FRONTEND=noninteractive
5
-
6
- # 安装 Python 和其他必要的系统依赖
7
- RUN apt-get update && apt-get install -y \
8
- python3 \
9
- python3-pip \
10
- wget \
11
- gnupg \
12
- curl \
13
- build-essential \
14
- python3-dev \
15
- && rm -rf /var/lib/apt/lists/*
16
 
17
  # 安装 Chrome
18
  RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
@@ -29,15 +15,14 @@ COPY requirements.txt .
29
  COPY app.py .
30
  COPY nb4x.py .
31
 
32
- # 升级 pip 并安装依赖
33
- RUN python3 -m pip install --upgrade pip && \
34
- python3 -m pip install -r requirements.txt
35
 
36
  # 暴露端口
37
  EXPOSE 7860
38
 
39
  # 创建启动脚本
40
- RUN echo '#!/bin/bash\npython3 app.py & python3 nb4x.py' > start.sh && \
41
  chmod +x start.sh
42
 
43
  # 启动命令
 
1
+ FROM python:3.9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  # 安装 Chrome
4
  RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
 
15
  COPY app.py .
16
  COPY nb4x.py .
17
 
18
+ # 安装依赖
19
+ RUN pip install -r requirements.txt
 
20
 
21
  # 暴露端口
22
  EXPOSE 7860
23
 
24
  # 创建启动脚本
25
+ RUN echo '#!/bin/bash\npython app.py & python nb4x.py' > start.sh && \
26
  chmod +x start.sh
27
 
28
  # 启动命令