Skip to content

Commit

Permalink
fix server package and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jianzfb committed Oct 14, 2024
1 parent f864465 commit 204bdae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
8 changes: 7 additions & 1 deletion antgo/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
DEFINE_indicator("auto", True, '') # 是否项目自动优化
DEFINE_indicator("finetune", True, '') # 是否启用finetune模式
DEFINE_indicator("release", True, '') # 发布
DEFINE_indicator("upgrade", True, '') # 升级标记
DEFINE_string('id', None, '')
DEFINE_string("ip", "", "set ip")
DEFINE_string("remote-ip", None, "")
Expand Down Expand Up @@ -276,8 +277,13 @@ def main():
if args.version is None or args.version == '-' or args.version == '':
args.version = 'master'
dockerfile_data = {
'version': args.version
'version': args.version,
'is_upgrade': 'no'
}
if args.upgrade:
dockerfile_data.update({
'is_upgrade': "upgrade"
})
env = Environment(loader=FileSystemLoader('/'.join(os.path.realpath(__file__).split('/')[0:-1])))
dockerfile_template = env.get_template('script/Dockerfile')
dockerfile_content = dockerfile_template.render(**dockerfile_data)
Expand Down
14 changes: 9 additions & 5 deletions antgo/script/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ FROM registry.cn-hangzhou.aliyuncs.com/vibstring/antgo-env:latest

COPY ./ /workspace/

# eagleeye 环境更新
RUN mkdir -p /root/.3rd && cd /root/.3rd && rm -rf eagleeye && git clone https://github.com/jianzfb/eagleeye.git

# antgo 环境
RUN pip3 install --upgrade --upgrade-strategy=only-if-needed git+https://github.com/jianzfb/antgo.git@{{version}}
ARG IS_ANTGO_UPGRADE="{{version}}"
RUN if [ "$IS_ANTGO_UPGRADE" != "master" ]; then \
pip3 install --upgrade --upgrade-strategy=only-if-needed git+https://github.com/jianzfb/antgo.git@{{version}}; \
fi

# eagleeye python 编译
RUN antgo install eagleeye && antgo install opencv && antgo install eigen
# eagleeye 环境更新
ARG IS_EAGLEEYE_UPGRADE="{{is_upgrade}}"
RUN if [ "$IS_EAGLEEYE_UPGRADE" = "upgrade" ]; then \
mkdir -p /root/.3rd && cd /root/.3rd && rm -rf eagleeye && git clone https://github.com/jianzfb/eagleeye.git && antgo install eagleeye; \
fi

# 修正环境信息
RUN rm /miniconda3/bin/../lib/libstdc++.so.6;ln /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /miniconda3/bin/../lib/libstdc++.so.6
Expand Down

0 comments on commit 204bdae

Please sign in to comment.