akhaliq HF staff commited on
Commit
7057648
·
1 Parent(s): 330e9ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,11 +1,13 @@
1
  import os
 
 
2
  os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
3
  os.system("git clone https://github.com/facebookresearch/Mask2Former.git")
4
  os.chdir("Mask2Former")
5
  os.system("pip install git+https://github.com/cocodataset/panopticapi.git")
6
  os.chdir("mask2former/modeling/pixel_decoder/ops")
7
- os.system("TORCH_CUDA_ARCH_LIST='8.0' FORCE_CUDA=1 python setup.py build install")
8
- os.system("/home/user/app/Mask2Former")
9
  import gradio as gr
10
  # check pytorch installation:
11
  import torch, torchvision
 
1
  import os
2
+ import os
3
+ print(os.environ.get('CUDA_PATH'))
4
  os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
5
  os.system("git clone https://github.com/facebookresearch/Mask2Former.git")
6
  os.chdir("Mask2Former")
7
  os.system("pip install git+https://github.com/cocodataset/panopticapi.git")
8
  os.chdir("mask2former/modeling/pixel_decoder/ops")
9
+ os.system("python setup.py build install")
10
+ os.chdir("/home/user/app/Mask2Former/")
11
  import gradio as gr
12
  # check pytorch installation:
13
  import torch, torchvision