TeddyUW commited on
Commit
82a8552
·
1 Parent(s): 4e8dc69
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. app.py +4 -4
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # Torch 1.10 (cu111) + Detectron2 0.6 on CUDA 11.1, lean for HF Spaces
2
  FROM nvidia/cuda:11.1.1-cudnn8-runtime-ubuntu20.04
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive \
@@ -34,6 +34,6 @@ WORKDIR /app
34
  COPY app.py /app/app.py
35
 
36
  # Copy pre-uploaded model(s)
37
- COPY models /models
38
 
39
  CMD ["python3", "app.py"]
 
1
+ # Torch 1.10 (cu111) + Detectron2 0.6 on CUDA 11.1
2
  FROM nvidia/cuda:11.1.1-cudnn8-runtime-ubuntu20.04
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive \
 
34
  COPY app.py /app/app.py
35
 
36
  # Copy pre-uploaded model(s)
37
+ COPY models /weights
38
 
39
  CMD ["python3", "app.py"]
app.py CHANGED
@@ -47,10 +47,10 @@ from detectree2.models.train import setup_cfg
47
 
48
  # --------- Config ---------
49
  WEIGHTS = {
50
- # NOTE: Dockerfile downloads this to /models
51
- "Forest": "/models/230103_randresize_full.pth",
52
- # "Urban": "/models/urban_trees_Cambridge_20230630.pth",
53
- # "Flexi": "/models/250312_flexi.pth",
54
  }
55
  DEFAULT_ENV = "Forest"
56
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
 
47
 
48
  # --------- Config ---------
49
  WEIGHTS = {
50
+ # NOTE: Dockerfile downloads this to /weights
51
+ "Forest": "/weights/230103_randresize_full.pth",
52
+ # "Urban": "/weights/urban_trees_Cambridge_20230630.pth",
53
+ # "Flexi": "/weights/250312_flexi.pth",
54
  }
55
  DEFAULT_ENV = "Forest"
56
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"