hamigua commited on
Commit
2544447
·
1 Parent(s): 2067a39

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -16
Dockerfile CHANGED
@@ -1,25 +1,22 @@
1
- # 使用预先构建的Node.js Base容器,包含Node.js环境和依赖项
2
- FROM node:18-alpine
3
- FROM python:3.9
4
  USER root
5
-
6
- ENV PATH=/node_modules/.bin:$PATH
7
-
8
  # 设置工作目录
9
  WORKDIR /app
10
-
11
- # 安装Git
12
  RUN apt-get update && \
13
- apt-get install -y git
14
 
 
 
 
 
 
 
15
  # 将FreedomGPT代码复制到容器中
16
  RUN git clone --recursive https://github.com/ohmplatform/FreedomGPT.git freedom-gpt
17
 
18
- # 安装Yarn
19
- RUN pip install yarn
20
-
21
- # 安装必要的依赖项
22
- RUN yarn install
23
-
24
  # 运行FreedomGPT
25
- CMD ["yarn", "start:prod"]
 
1
+ # 基于的基础镜像
2
+ FROM node:latest
 
3
  USER root
4
+
 
 
5
  # 设置工作目录
6
  WORKDIR /app
7
+
8
+ # 安装 Git
9
  RUN apt-get update && \
10
+ apt-get install -y git
11
 
12
+ # 安装 Yarn
13
+ RUN curl -o- -L https://yarnpkg.com/install.sh | bash
14
+
15
+ # 设置环境变量
16
+ ENV PATH=/app/node_modules/.bin:$PATH
17
+
18
  # 将FreedomGPT代码复制到容器中
19
  RUN git clone --recursive https://github.com/ohmplatform/FreedomGPT.git freedom-gpt
20
 
 
 
 
 
 
 
21
  # 运行FreedomGPT
22
+ CMD ["yarn", "start:prod"]