在 docker 中安装 sam

1、进入 docker,共享一个主机的目录。

docker run -it --gpus all -v /home/wjp/host_share:/host_share 0783

2、在主机的目录中做 git clone。

git clone https://github.com/facebookresearch/segment-anything.git

3、进入 segment-anything 目录,用 pip install . 安装。

Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Processing /host_share/segment-anything
Building wheels for collected packages: segment-anything
  Building wheel for segment-anything (setup.py) ... done
  Created wheel for segment-anything: filename=segment_anything-1.0-py3-none-any.whl size=36611 sha256=d6a271afdc6950d5cc982624b35546b53fcaa6108ee1038f79bac47f247c171a
  Stored in directory: /tmp/pip-ephem-wheel-cache-jk17gyup/wheels/60/b1/ff/9fd50a5f9f5b78f33e1efd50ddc085119d0d92ff66dded09fc
Successfully built segment-anything
Installing collected packages: segment-anything
Successfully installed segment-anything-1.0

注意:如果用 pip install -e . 安装,提示信息是这样的

Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Obtaining file:///host_share/segment-anything
Installing collected packages: segment-anything
  Running setup.py develop for segment-anything
Successfully installed segment-anything

其实没装上。

相关推荐

  1. docker 安装 sam

    2023-12-16 11:28:01       37 阅读
  2. docker 安装 GLEE

    2023-12-16 11:28:01       38 阅读
  3. ubuntudocker容器安装strongswan

    2023-12-16 11:28:01       12 阅读
  4. 如何Linux安装Docker Compose

    2023-12-16 11:28:01       8 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-16 11:28:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-16 11:28:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-16 11:28:01       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-16 11:28:01       20 阅读

热门阅读

  1. flutter Pageview组件

    2023-12-16 11:28:01       36 阅读
  2. 4-Docker命令之docker images

    2023-12-16 11:28:01       41 阅读
  3. ZooKeeper中bin目录4个脚本执行文件详解

    2023-12-16 11:28:01       32 阅读
  4. 在 C++ 中局部变量和全局变量

    2023-12-16 11:28:01       43 阅读
  5. LoRA(Low-Rank Adaptation)

    2023-12-16 11:28:01       40 阅读
  6. LeetCode 2132. 用邮票贴满网格图

    2023-12-16 11:28:01       34 阅读
  7. Unix环境高级编程-学习-03-XSI-IPC之消息队列

    2023-12-16 11:28:01       33 阅读