GeoFocus 部署笔记

张开发
2026/4/8 6:32:56 15 分钟阅读

分享文章

GeoFocus 部署笔记
目录docker版本代码安装版setup.py bug修正。docker版本docker build -t geo-focus:latest .-t geo-focus:latest为构建的镜像设置一个名称和标签这里叫geo-focus标签是latest。.表示构建上下文为当前目录。docker run -it --rm \ --gpus all \ -v /data/lbg/project:/workspace \ -v /data/lbg/models:/models \ geo-focus:latest \ /bin/bash -it分配一个交互式终端。 --rm容器退出后自动删除避免产生过多临时容器。 --gpus all将宿主机的所有 GPU 透传给容器。 -v挂载目录把宿主机的代码和模型目录映射到容器内方便修改和持久化数据。 /bin/bash容器启动后执行的命令即打开 Bash。代码安装版setup.py bug修正。setup.py# Copyright 2024 Bytedance Ltd. and/or its affiliates # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an AS IS BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import os import re from setuptools import find_packages, setup def get_version() - str: with open(os.path.join(GeoFocus_dynamicGT/verl, __init__.py), encodingutf-8) as f: file_content f.read() pattern r__version__\W*\W*\([^\])\ (version,) re.findall(pattern, file_content) return version def get_requires() - list[str]: with open(requirements.txt, encodingutf-8) as f: file_content f.read() lines [line.strip() for line in file_content.strip().split(\n) if not line.startswith(#)] return lines extra_require { dev: [pre-commit, ruff], } def main(): setup( nameverl, versionget_version(), descriptionAn Efficient, Scalable, Multi-Modality RL Training Framework based on veRL, long_descriptionopen(README.md, encodingutf-8).read(), long_description_content_typetext/markdown, authorverl, author_emailzhangchi.usc1992bytedance.com, gmshengconnect.hku.hk, hiyougabuaa.edu.cn, licenseApache 2.0 License, urlhttps://github.com/volcengine/verl, package_dir{: .}, packagesfind_packages(where.), python_requires3.9.0, install_requiresget_requires(), extras_requireextra_require, ) if __name__ __main__: main()

更多文章