Spaces:
Running
Running
Commit
Β·
37933c5
1
Parent(s):
173b561
Update Dockerfile
Browse files- Dockerfile +5 -24
Dockerfile
CHANGED
@@ -7,9 +7,8 @@ RUN apt-get -y update \
|
|
7 |
|
8 |
RUN add-apt-repository ppa:deadsnakes/ppa \
|
9 |
&& apt-get -y update \
|
10 |
-
&& apt-get -y install python3.9 python3.9-dev python3-pip python3.9-distutils
|
11 |
-
|
12 |
-
RUN ln -s /usr/bin/python3.9 /usr/bin/python \
|
13 |
&& rm -rf /var/lib/apt/lists/*
|
14 |
|
15 |
RUN useradd -m -u 1000 user
|
@@ -23,27 +22,9 @@ WORKDIR $HOME/mateo-demo
|
|
23 |
|
24 |
RUN python -m pip install --no-cache-dir --upgrade pip && python -m pip install --no-cache-dir --upgrade .
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
ENV BASE=""
|
29 |
-
ENV NO_CUDA=""
|
30 |
-
ENV DEMO_MODE=""
|
31 |
-
|
32 |
-
EXPOSE $PORT
|
33 |
-
HEALTHCHECK CMD curl --fail http://$SERVER:$PORT$BASE/_stcore/health
|
34 |
|
35 |
WORKDIR $HOME/mateo-demo/src/mateo_st
|
36 |
|
37 |
-
CMD
|
38 |
-
cmd="streamlit run 01_π_MATEO.py --server.port $PORT --browser.serverAddress $SERVER --server.enableXsrfProtection false"; \
|
39 |
-
else \
|
40 |
-
cmd="streamlit run 01_π_MATEO.py --server.port $PORT --browser.serverAddress $SERVER --server.baseUrlPath $BASE --server.enableXsrfProtection false"; \
|
41 |
-
fi; \
|
42 |
-
if [ "$NO_CUDA" = "true" ] || [ "$DEMO_MODE" = "true" ]; then \
|
43 |
-
opts="--"; \
|
44 |
-
[ "$NO_CUDA" = "true" ] && opts="$opts --no_cuda"; \
|
45 |
-
[ "$DEMO_MODE" = "true" ] && opts="$opts --demo_mode"; \
|
46 |
-
cmd="$cmd $opts"; \
|
47 |
-
fi; \
|
48 |
-
|
49 |
-
exec $cmd
|
|
|
7 |
|
8 |
RUN add-apt-repository ppa:deadsnakes/ppa \
|
9 |
&& apt-get -y update \
|
10 |
+
&& apt-get -y install python3.9 python3.9-dev python3-pip python3.9-distutils \
|
11 |
+
&& ln -s /usr/bin/python3.9 /usr/bin/python \
|
|
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
RUN useradd -m -u 1000 user
|
|
|
22 |
|
23 |
RUN python -m pip install --no-cache-dir --upgrade pip && python -m pip install --no-cache-dir --upgrade .
|
24 |
|
25 |
+
EXPOSE 7860
|
26 |
+
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
WORKDIR $HOME/mateo-demo/src/mateo_st
|
29 |
|
30 |
+
CMD streamlit run 01_π_MATEO.py --server.port 7860 --server.enableXsrfProtection false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|