-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (21 loc) · 1.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM python:3.7
WORKDIR /chest-xray-v2
# gcc compiler and opencv prerequisites
RUN apt update \
&& apt install -y htop wget nano git build-essential libglib2.0-0 libsm6 libxext6 libxrender-dev
EXPOSE 8501
COPY . .
# FOR X86
RUN /bin/bash -c "pip3 install -r requirements_docker.txt \
&& pip3 install cython \
&& pip3 install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI' \
&& python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/index.html \
&& python src/download_5_classes_model.py --model_directory snapshots"
# FOR ARM (APPLE M1)
# RUN /bin/bash -c "pip3 install -r requirements_docker.txt \
# && pip3 install cython \
# && pip3 install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI' \
# && python -m pip install 'git+https://github.com/facebookresearch/detectron2.git' \
# && python src/download_5_classes_model.py --model_directory snapshots"
ENTRYPOINT ["streamlit", "run"]
CMD ["streamlit_inference.py"]