Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ingress notebook access #219

Merged
merged 2 commits into from
Jul 17, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion paddlecloud/notebook/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class UserNotebook():
"name": "cloud-notebook",
"image": settings.PADDLE_BOOK_IMAGE,
"command": ["sh", "-c",
"mkdir -p /root/.jupyter; echo \"c.NotebookApp.base_url = '/notebook/%s'\" > /root/.jupyter/jupyter_notebook_config.py; jupyter notebook --debug --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True /book/"],
"mkdir -p /root/.jupyter; echo \"c.NotebookApp.base_url = '/notebook/%s'\" > /root/.jupyter/jupyter_notebook_config.py; echo \"c.NotebookApp.allow_origin = '*'\" >> /root/.jupyter/jupyter_notebook_config.py; jupyter notebook --debug --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True /book/"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we do not use the debug flag?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"ports": [{
"containerPort": settings.PADDLE_BOOK_PORT
}],
Expand Down
9 changes: 3 additions & 6 deletions paddlecloud/paddlecloud/templates/site_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

{% block nav %}
{% get_user_notebook_status request.user as status %}
{% if request.user.is_authenticated %}
<ul class="nav navbar-nav">
<li><a href="/notedash">MyNoteBook
{% if request.user.is_authenticated %}
<li><a href="/notedash">我的NoteBook
{% if status == "running" %}
<span class="label label-success">{{ status }}</span>
{% elif status == "starting" %}
Expand All @@ -19,12 +19,9 @@
{% elif status == "unknown" %}
<span class="label label-default">{{ status }}</span>
{% endif %}
{% endif %}
</a></li>
<li>

</li>
</ul>
{% endif %}
{% endblock %}

{% block styles %}
Expand Down