在 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

其实没装上。

  • 8
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值