File tree Expand file tree Collapse file tree
src/baseline/v2/inference/docker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,18 +2,30 @@ FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime
22
33WORKDIR /app
44
5- # system deps
5+ # -----------------------------
6+ # System dependencies
7+ # -----------------------------
68RUN apt-get update && apt-get install -y \
79 git \
810 wget \
911 && rm -rf /var/lib/apt/lists/*
1012
11- # python deps
13+ # -----------------------------
14+ # Python dependencies
15+ # -----------------------------
1216COPY requirements.txt .
17+
18+ # remove torchvision (not needed + removes warning)
19+ RUN pip uninstall -y torchvision || true
20+
1321RUN pip install --no-cache-dir -r requirements.txt
1422
15- # copy code
23+ # -----------------------------
24+ # Copy code
25+ # -----------------------------
1626COPY . .
1727
18- # run inference
28+ # -----------------------------
29+ # Run inference
30+ # -----------------------------
1931ENTRYPOINT ["python" , "inference.py" ]
Original file line number Diff line number Diff line change 1414)
1515
1616from models .unet import build_model
17-
17+ import time
1818
1919# -----------------------------
2020# ARGUMENTS
2525parser .add_argument ("--output" , required = True , help = "Path to save pseudo CT" )
2626args = parser .parse_args ()
2727
28+ total_start = time .time ()
29+
30+
2831INPUT_PATH = Path (args .input )
2932OUTPUT_PATH = Path (args .output )
3033
99102 str (OUTPUT_PATH )
100103)
101104
102- print ("Saved:" , OUTPUT_PATH )
105+ print ("Saved:" , OUTPUT_PATH )
106+
107+ total_end = time .time ()
108+ print (f"Total runtime: { total_end - total_start :.2f} seconds" )
Original file line number Diff line number Diff line change 1- monai
1+ monai==1.3.0
22nibabel
33tqdm
You can’t perform that action at this time.
0 commit comments