jljiu commited on
Commit
1fb28f9
·
verified ·
1 Parent(s): 04c9253

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 基础镜像使用Python 3.9
2
+ FROM python:3.9
3
+
4
+ # 创建一个新用户
5
+ RUN useradd -m -u 1000 user
6
+
7
+ # 设置工作目录
8
+ WORKDIR /app
9
+
10
+ # 切换到新用户
11
+ USER user
12
+
13
+ # 安装Ollama
14
+ RUN curl https://ollama.ai/install.sh | sh
15
+
16
+ # 安装Gradio及其依赖
17
+ RUN pip install gradio
18
+
19
+ # 将当前目录下的所有文件复制到容器内的/app目录
20
+ COPY. /app
21
+
22
+ # 启动命令,你可以根据实际需求调整
23
+ CMD ["python", "app.py"]