Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
LAE
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
文靖昊
LAE
Commits
4d1057e8
Commit
4d1057e8
authored
9 months ago
by
陈正乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
镜像创建,容器启动
parent
c88f6743
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
1 deletions
+49
-1
Dockerfile
Dockerfile
+17
-0
docker-compose.yml
docker-compose.yml
+31
-0
gradio_test.py
test/gradio_test.py
+1
-1
No files found.
Dockerfile
0 → 100644
View file @
4d1057e8
# 使用官方的Python 3.10基础镜像
FROM
python:3.10
# 设置工作目录
WORKDIR
/app
# 复制当前目录下的所有文件到工作目录
COPY
. /app
# 配置pip使用清华镜像源
RUN
pip config
set
global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# 配置python环境
RUN
pip install
--no-cache-dir
-r
requirements.txt
# 运行一个简单的Python命令以确保环境正确配置
CMD
["python", "--version"]
This diff is collapsed.
Click to expand it.
docker-compose.yml
0 → 100644
View file @
4d1057e8
version
:
'
3'
services
:
postgres
:
image
:
postgres
container_name
:
lae_pgsql
environment
:
POSTGRES_PASSWORD
:
111111
ports
:
-
"
5433:5432"
volumes
:
-
./lae_pg_data:/var/lib/postgresql/data
-
./init_db:/docker-entrypoint-initdb.d
python
:
build
:
context
:
.
dockerfile
:
Dockerfile
image
:
lae_python_image:3.10
container_name
:
lae_python
volumes
:
-
.:/app
ports
:
-
"
8003:8003"
stdin_open
:
true
tty
:
true
command
:
/bin/bash
volumes
:
lae_pg_data
:
This diff is collapsed.
Click to expand it.
test/gradio_test.py
View file @
4d1057e8
...
@@ -126,7 +126,7 @@ def main():
...
@@ -126,7 +126,7 @@ def main():
return
history
return
history
def
clear_tip
(
his
):
def
clear_tip
(
his
):
if
not
his
[
0
][
0
]
and
his
[
0
][
1
]
==
"
我是新晨科技股份有限公司开发的人工智能助手,名叫小晨,如果您有任何问题,欢迎随时向我咨询
"
:
if
not
his
[
0
][
0
]
and
his
[
0
][
1
]
==
"
你好,我是新晨科技股份的人工智能助手小晨,如果您有低空经济相关问题,欢迎随时向我咨询。
"
:
return
his
[
1
:]
return
his
[
1
:]
else
:
else
:
return
his
return
his
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment