在 docker 中安装 GLEE

1、安装 detectron2

2、git clone GLEE。

git clone https://github.com/FoundationVision/GLEE.git

docker 中没有 git,可以通过共享主机文件夹,在主机中做 git clone。

3、删除 GLEE/app/requirements.txt 中的 torch 和 torchvision,再 pip 。

root@e86d0af48236:/host_share/GLEE/app# cat requirements.txt 
--extra-index-url https://download.pytorch.org/whl/cu118
torch==2.1.0        #删除
torchvision        #删除
scipy
opencv-python
timm
transformers
einops
root@e86d0af48236:/host_share/GLEE/app# vi requirements.txt 
root@e86d0af48236:/host_share/GLEE/app# cat requirements.txt 
--extra-index-url https://download.pytorch.org/whl/cu118
scipy
opencv-python
timm
transformers
einops
root@e86d0af48236:/host_share/GLEE/app# pip install -r requirements.txt

4、安装 gradio 和 对 pillow 降级(版本不大于10)。

pip install gradio
pip install pillow==9.5.0  # 如果 pillow 出现错误“AttributeError: module 'PIL.Image' has no attribute 'LINEAR'”,需要降级。

5、下载 GLEE_R50_Scaleup10m.pth 和 GLEE_R50_Scaleup10m.pth,放在 GLEE/app/ 中;下载 clip_vit_base_patch32 到 GLEE/app/GLEE/ 中。

6、运行 app.py。

root@e86d0af48236:/host_share/GLEE/app# python3.8 app.py
Is CUDA available: True
CUDA device: Tesla T4
use cuda
Config 'GLEE/configs/R50.yaml' has no VERSION. Assuming it to be compatible with latest v2.
Config 'GLEE/configs/SwinL.yaml' has no VERSION. Assuming it to be compatible with latest v2.
/usr/local/lib/python3.8/dist-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at  ../aten/src/ATen/native/TensorShape.cpp:2157.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`

相关推荐

  1. docker 安装 GLEE

    2023-12-28 17:44:05       62 阅读
  2. docker 安装 sam

    2023-12-28 17:44:05       56 阅读
  3. ubuntudocker容器安装strongswan

    2023-12-28 17:44:05       34 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-28 17:44:05       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-28 17:44:05       100 阅读
  3. 在Django里面运行非项目文件

    2023-12-28 17:44:05       82 阅读
  4. Python语言-面向对象

    2023-12-28 17:44:05       91 阅读

热门阅读

  1. Thinkphp5钩子和触发钩子

    2023-12-28 17:44:05       55 阅读
  2. Spring Boot整合RocketMQ

    2023-12-28 17:44:05       61 阅读
  3. CentOS:Nginx 413 Request Entity Too Large

    2023-12-28 17:44:05       57 阅读
  4. PHP cookie和Sessions

    2023-12-28 17:44:05       60 阅读
  5. CSRF和SSRF原理、区别、防御方法

    2023-12-28 17:44:05       57 阅读
  6. el-table 纵向垂直表头

    2023-12-28 17:44:05       59 阅读
  7. Linux:Vim

    2023-12-28 17:44:05       56 阅读
  8. K8s 之动态编排

    2023-12-28 17:44:05       60 阅读
  9. RivaGAN 水印项目

    2023-12-28 17:44:05       55 阅读
  10. [spark] RDD, DataFrame和DataSet是什么?如何相互转化

    2023-12-28 17:44:05       57 阅读
  11. Leetcode7-库存管理(158)

    2023-12-28 17:44:05       54 阅读
  12. esp32idf使用thingscloud例程

    2023-12-28 17:44:05       57 阅读