qtangs / sagemaker-notebook-container

Docker images that replicate the Amazon SageMaker Notebook instance.
MIT License
58 stars 30 forks source link

Notebook Launcher not Working #1

Closed cacorrea93 closed 5 years ago

cacorrea93 commented 5 years ago

I am trying to create a Notebook Launcher in jupyter lab, but i get the next error

Screenshot from 2019-08-27 17-45-41 Screenshot from 2019-08-27 17-45-44

In the contanier logs I get the following Permision denied:

sagemaker-notebook-container | [I 21:45:05.171 NotebookApp] Creating new notebook in / sagemaker-notebook-container | [W 21:45:05.188 NotebookApp] 403 POST /api/contents/?1566942305168 (172.22.0.1): Permission denied: Untitled.ipynb

Going back, when using docker-compose up sagemaker-notebook-container, i get the following:

Starting sagemaker-notebook-container ... done Attaching to sagemaker-notebook-container sagemaker-notebook-container | id: ‘jovyan’: no such user sagemaker-notebook-container | Executing the command: jupyter notebook sagemaker-notebook-container | [I 21:38:37.768 NotebookApp] JupyterLab extension loaded from /home/ec2-user/anaconda3/lib/python3.7/site-packages/jupyterlab sagemaker-notebook-container | [I 21:38:37.768 NotebookApp] JupyterLab application directory is /home/ec2-user/anaconda3/share/jupyter/lab sagemaker-notebook-container | [I 21:38:37.777 NotebookApp] [nb_conda] enabled sagemaker-notebook-container | [I 21:38:38.024 NotebookApp] Serving notebooks from local directory: /home/ec2-user/SageMaker sagemaker-notebook-container | [I 21:38:38.024 NotebookApp] The Jupyter Notebook is running at: sagemaker-notebook-container | [I 21:38:38.024 NotebookApp] http://18959a11f25e:8888/?token=060991626e63a4541e8faa40cdf46d9f97b03874ee2d90a7 sagemaker-notebook-container | [I 21:38:38.024 NotebookApp] or http://127.0.0.1:8888/?token=060991626e63a4541e8faa40cdf46d9f97b03874ee2d90a7 sagemaker-notebook-container | [I 21:38:38.024 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). sagemaker-notebook-container | [C 21:38:38.028 NotebookApp] sagemaker-notebook-container |
sagemaker-notebook-container | To access the notebook, open this file in a browser: sagemaker-notebook-container | file:///home/ec2-user/.local/share/jupyter/runtime/nbserver-9-open.html sagemaker-notebook-container | Or copy and paste one of these URLs: sagemaker-notebook-container | http://18959a11f25e:8888/?token=060991626e63a4541e8faa40cdf46d9f97b03874ee2d90a7 sagemaker-notebook-container | or http://127.0.0.1:8888/?token=060991626e63a4541e8faa40cdf46d9f97b03874ee2d90a7

it seems maybe the problem is in the user id "jovyan". If it is then, how can I change the id?

qtangs commented 5 years ago

This message is produced by Jupyter's start.sh file, it doesn't affect anything so you can ignore it.

id: ‘jovyan’: no such user

Have you updated this line in docker-compose.yml to use a proper folder in your machine? I put /Users/foobar/projects/SageMaker only as an example.

  • /Users/foobar/projects/SageMaker:/home/ec2-user/SageMaker
cacorrea93 commented 5 years ago

I get the problem, it was on the aws credentials profile, they were configured wrong in my system. Fixing this solved the problem.

qtangs commented 5 years ago

I'm glad you managed to get it working.