Spaces:
Sleeping
Sleeping
Commit
Β·
1709c05
1
Parent(s):
bc4ec73
Update Dockerfile
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -17,20 +17,21 @@ WORKDIR /mateo-demo
|
|
| 17 |
|
| 18 |
RUN python -m pip install --no-cache-dir --upgrade pip && python -m pip install --no-cache-dir --upgrade .
|
| 19 |
|
| 20 |
-
ENV PORT=
|
| 21 |
ENV SERVER="localhost"
|
| 22 |
ENV BASE=""
|
| 23 |
ENV NO_CUDA=""
|
| 24 |
ENV DEMO_MODE=""
|
|
|
|
| 25 |
EXPOSE $PORT
|
| 26 |
HEALTHCHECK CMD curl --fail http://$SERVER:$PORT$BASE/_stcore/health
|
| 27 |
|
| 28 |
WORKDIR /mateo-demo/src/mateo_st
|
| 29 |
|
| 30 |
CMD if [ -z "$BASE" ]; then \
|
| 31 |
-
cmd="streamlit run 01_π_MATEO.py --server.port $PORT --browser.serverAddress $SERVER"; \
|
| 32 |
else \
|
| 33 |
-
cmd="streamlit run 01_π_MATEO.py --server.port $PORT --browser.serverAddress $SERVER --server.baseUrlPath $BASE"; \
|
| 34 |
fi; \
|
| 35 |
if [ "$NO_CUDA" = "true" ] || [ "$DEMO_MODE" = "true" ]; then \
|
| 36 |
opts="--"; \
|
|
@@ -38,4 +39,5 @@ CMD if [ -z "$BASE" ]; then \
|
|
| 38 |
[ "$DEMO_MODE" = "true" ] && opts="$opts --demo_mode"; \
|
| 39 |
cmd="$cmd $opts"; \
|
| 40 |
fi; \
|
| 41 |
-
|
|
|
|
|
|
| 17 |
|
| 18 |
RUN python -m pip install --no-cache-dir --upgrade pip && python -m pip install --no-cache-dir --upgrade .
|
| 19 |
|
| 20 |
+
ENV PORT=7860
|
| 21 |
ENV SERVER="localhost"
|
| 22 |
ENV BASE=""
|
| 23 |
ENV NO_CUDA=""
|
| 24 |
ENV DEMO_MODE=""
|
| 25 |
+
|
| 26 |
EXPOSE $PORT
|
| 27 |
HEALTHCHECK CMD curl --fail http://$SERVER:$PORT$BASE/_stcore/health
|
| 28 |
|
| 29 |
WORKDIR /mateo-demo/src/mateo_st
|
| 30 |
|
| 31 |
CMD if [ -z "$BASE" ]; then \
|
| 32 |
+
cmd="streamlit run 01_π_MATEO.py --server.port $PORT --browser.serverAddress $SERVER --server.enableXsrfProtection false"; \
|
| 33 |
else \
|
| 34 |
+
cmd="streamlit run 01_π_MATEO.py --server.port $PORT --browser.serverAddress $SERVER --server.baseUrlPath $BASE --server.enableXsrfProtection false"; \
|
| 35 |
fi; \
|
| 36 |
if [ "$NO_CUDA" = "true" ] || [ "$DEMO_MODE" = "true" ]; then \
|
| 37 |
opts="--"; \
|
|
|
|
| 39 |
[ "$DEMO_MODE" = "true" ] && opts="$opts --demo_mode"; \
|
| 40 |
cmd="$cmd $opts"; \
|
| 41 |
fi; \
|
| 42 |
+
|
| 43 |
+
exec $cmd
|