Spaces:
Runtime error
Runtime error
update import detectron2
Browse files- Dockerfile +9 -9
Dockerfile
CHANGED
@@ -8,12 +8,12 @@ RUN ln -sv /usr/bin/python3 /usr/bin/python
|
|
8 |
|
9 |
# create a non-root user
|
10 |
ARG USER_ID=1000
|
11 |
-
RUN useradd -m --no-log-init --system --uid ${USER_ID}
|
12 |
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
13 |
-
USER
|
14 |
-
WORKDIR /home/
|
15 |
|
16 |
-
ENV PATH="/home/
|
17 |
RUN wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && \
|
18 |
python3 get-pip.py --user && \
|
19 |
rm get-pip.py
|
@@ -37,9 +37,9 @@ RUN pip install --user -e detectron2_repo
|
|
37 |
|
38 |
# Set a fixed model cache directory.
|
39 |
ENV FVCORE_CACHE="/tmp"
|
40 |
-
WORKDIR /home/
|
41 |
|
42 |
-
# run detectron2 under user "
|
43 |
# wget http://images.cocodataset.org/val2017/000000439715.jpg -O input.jpg
|
44 |
# python3 demo/demo.py \
|
45 |
#--config-file configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml \
|
@@ -47,9 +47,9 @@ WORKDIR /home/appuser/detectron2_repo
|
|
47 |
#--opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl
|
48 |
FROM python:3.9
|
49 |
|
50 |
-
|
51 |
-
USER
|
52 |
-
ENV PATH="/home/
|
53 |
|
54 |
WORKDIR /app
|
55 |
|
|
|
8 |
|
9 |
# create a non-root user
|
10 |
ARG USER_ID=1000
|
11 |
+
RUN useradd -m --no-log-init --system --uid ${USER_ID} user -g sudo
|
12 |
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
13 |
+
USER user
|
14 |
+
WORKDIR /home/user
|
15 |
|
16 |
+
ENV PATH="/home/user/.local/bin:${PATH}"
|
17 |
RUN wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && \
|
18 |
python3 get-pip.py --user && \
|
19 |
rm get-pip.py
|
|
|
37 |
|
38 |
# Set a fixed model cache directory.
|
39 |
ENV FVCORE_CACHE="/tmp"
|
40 |
+
WORKDIR /home/user/detectron2_repo
|
41 |
|
42 |
+
# run detectron2 under user "user":
|
43 |
# wget http://images.cocodataset.org/val2017/000000439715.jpg -O input.jpg
|
44 |
# python3 demo/demo.py \
|
45 |
#--config-file configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml \
|
|
|
47 |
#--opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl
|
48 |
FROM python:3.9
|
49 |
|
50 |
+
RUN useradd -m -u 1000 user
|
51 |
+
USER user
|
52 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
53 |
|
54 |
WORKDIR /app
|
55 |
|