This commit is contained in:
@@ -2,9 +2,14 @@ kind: pipeline
|
|||||||
type: docker
|
type: docker
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: greeting
|
- name: run-ai
|
||||||
image: registry.buyusdt.xyz/ai-modelscope:latest
|
image: registry.buyusdt.xyz/ai-modelscope:latest
|
||||||
network_mode: host
|
network_mode: host
|
||||||
commands:
|
commands:
|
||||||
- uvicorn main:app --reload --host '0.0.0.0' --port 9741
|
- echo "192.168.31.100 git.buyusdt.xyz" >> /etc/hosts
|
||||||
|
- git clone https://git.buyusdt.xyz/bmy/ai-hand
|
||||||
|
- cd /drone/src/ai-hand/ && uvicorn main:app --reload --host '0.0.0.0' --port 9741
|
||||||
|
|||||||
@@ -7,7 +7,12 @@ COPY ./requirements.txt /requirements.txt
|
|||||||
RUN sed -i s@deb.debian.org@mirrors.tuna.tsinghua.edu.cn@g /etc/apt/sources.list.d/debian.sources
|
RUN sed -i s@deb.debian.org@mirrors.tuna.tsinghua.edu.cn@g /etc/apt/sources.list.d/debian.sources
|
||||||
|
|
||||||
# 解决python 库 cv2报错 libGL.so.1: cannot open shared object file: No such file or directory
|
# 解决python 库 cv2报错 libGL.so.1: cannot open shared object file: No such file or directory
|
||||||
RUN apt-get clean && apt-get update && apt-get install -y libgl1
|
RUN apt-get clean && apt-get update && apt-get install -y libgl1 git git-lfs
|
||||||
|
|
||||||
|
# 配置git账户和邮箱
|
||||||
|
RUN git config --global user.name "bmy" && git config --global user.email "2271608011@qq.com"
|
||||||
|
# 取消git对ssl证书的验证,让 drone 可以顺利克隆代码
|
||||||
|
RUN git config --global http.sslVerify "false"
|
||||||
|
|
||||||
# 更换pip下载地址为阿里云镜像源
|
# 更换pip下载地址为阿里云镜像源
|
||||||
RUN pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
|
RUN pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
|
||||||
|
|||||||
7
笔记.txt
7
笔记.txt
@@ -1,9 +1,12 @@
|
|||||||
启动命令:uvicorn main:app --reload --host '0.0.0.0' --port 9741
|
启动命令:uvicorn main:app --reload --host '0.0.0.0' --port 9741
|
||||||
|
|
||||||
|
|
||||||
打包 基镜像:docker build -f Dockerfile-base -t 2271608011/ai-modelscope:v1.0 .
|
打包 基镜像:docker build -f Dockerfile-base -t registry.buyusdt.xyz/ai-modelscope:latest .
|
||||||
|
|
||||||
打包 项目 镜像:docker build -f Dockerfile-project -t ai-hand-project .
|
打包 项目 镜像:docker build -f Dockerfile-project -t registry.buyusdt.xyz/ai-hand-project .
|
||||||
|
|
||||||
|
|
||||||
运行镜像:docker run -d --name ai-hand-project -p 9741:9741 ai-hand-project
|
运行镜像:docker run -d --name ai-hand-project -p 9741:9741 ai-hand-project
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user