osanseviero commited on
Commit
e42c76c
·
1 Parent(s): b65f5dd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -8
Dockerfile CHANGED
@@ -14,18 +14,14 @@ RUN chown 1000:1000 /.local
14
  RUN chown 1000:1000 /.jupyter
15
  EXPOSE 7860
16
 
17
- RUN mkdir -p /root/.ipython/profile_default/
18
- RUN chown 1000:1000 /root/.ipython/profile_default/
19
-
20
  RUN (echo "c = get_config()" && \
21
- echo "headers = {'Content-Security-Policy': 'frame-ancestors self https://huggingface.co/spaces/osanseviero/jupyter'}" && \
22
  echo "c.NotebookApp.allow_origin = '*'" && \
23
  echo "c.NotebookApp.token = ''" && \
24
  echo "c.NotebookApp.allow_credentials = True" && \
25
- echo "c.NotebookApp.tornado_settings = {'headers': headers}" && \
26
- > /root/.ipython/profile_default/ipython_notebook_config.py
27
-
28
 
29
- CMD ["jupyter-lab","--ip=0.0.0.0", "--port=7860", "--no-browser","--allow-root", "--ServerApp.tornado_settings=c.NotebookApp.token='test'"]
 
30
 
31
 
 
14
  RUN chown 1000:1000 /.jupyter
15
  EXPOSE 7860
16
 
 
 
 
17
  RUN (echo "c = get_config()" && \
 
18
  echo "c.NotebookApp.allow_origin = '*'" && \
19
  echo "c.NotebookApp.token = ''" && \
20
  echo "c.NotebookApp.allow_credentials = True" && \
21
+ echo "c.NotebookApp.tornado_settings = {'Content-Security-Policy': 'frame-ancestors self https://huggingface.co/spaces/osanseviero/jupyter'}" && \
22
+ > /.jupyter/jupyter_notebook_config.py
 
23
 
24
+ RUN cat /.jupyter/jupyter_notebook_config.py
25
+ CMD ["jupyter-lab","--ip=0.0.0.0", "--port=7860", "--no-browser","--allow-root"]
26
 
27