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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -4
Dockerfile CHANGED
@@ -12,16 +12,22 @@ WORKDIR /.local
12
  WORKDIR /.jupyter
13
  RUN chown 1000:1000 /.local
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
 
 
 
12
  WORKDIR /.jupyter
13
  RUN chown 1000:1000 /.local
14
  RUN chown 1000:1000 /.jupyter
15
+ ENV JUPYTER_TOKEN=easy
16
  EXPOSE 7860
17
 
18
+ RUN mkdir -p /root/.ipython/profile_default/
19
+ RUN chown 1000:1000 /root/.ipython/profile_default/
20
+
21
  RUN (echo "c = get_config()" && \
22
+ echo "headers = {'Content-Security-Policy': 'frame-ancestors *'}" && \
23
  echo "c.NotebookApp.allow_origin = '*'" && \
 
24
  echo "c.NotebookApp.allow_credentials = True" && \
25
+ echo "c.NotebookApp.tornado_settings = {'headers': headers}" && \
26
+ echo "c.NotebookApp.open_browser = False") && \
27
+ > /root/.ipython/profile_default/ipython_notebook_config.py
28
+
29
 
 
30
  CMD ["jupyter-lab","--ip=0.0.0.0", "--port=7860", "--no-browser","--allow-root"]
31
 
32
 
33
+