okfn-brasil / serenata-notebooks

Notebooks from Operação Serenata de Amor | ** Este repositório não recebe atualizações frequentes **
MIT License
53 stars 12 forks source link

Using mybinder instructions to improve Dockerfile #25

Closed thiagoalmeidasa closed 5 years ago

thiagoalmeidasa commented 5 years ago

What is the purpose of this Pull Request?

The purpose of this PR is to update the Dockerfile in order to improve layers and compatibility with binder .

What was done to achieve this purpose?

The Dockerfile and the docker-compose were updated for a better layer and volume management.

How to test if it really works?

Click on launch to binder badge on the Readme.md.

Who can help reviewing it?

Anyone involved in this project.

TODO

Maybe would be great to use conda environment file to manage dependencies.

thiagoalmeidasa commented 5 years ago

@jtemporal do you need something else to complete the review?

thiagoalmeidasa commented 5 years ago

@cuducos I tried to follow your tips. Can you verify again?

jtemporal commented 5 years ago

@thiagoalmeidasa I think the improvements are nice, but I had a little problem, I tried to do a docker-compse up and it failed:

✔️ okfn-brasil-notebooks (master) docker-compose up
Recreating okbr-serenata-notebooks ... done
Attaching to okbr-serenata-notebooks
okbr-serenata-notebooks    | [I 01:05:14.258 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
okbr-serenata-notebooks    | [W 01:05:14.514 NotebookApp] All authentication is disabled.  Anyone who can connect to this server will be able to run code.
okbr-serenata-notebooks    | [C 01:05:14.520 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.
okbr-serenata-notebooks exited with code 1
✔️ okfn-brasil-notebooks (master)

I see that you changed the user but for some reason the user is not working, maybe there's a problem with creating the user. could you check it out?

jtemporal commented 5 years ago

ps.: sorry it took me so long to give an feedback to you :wink:

thiagoalmeidasa commented 5 years ago

Hey @jtemporal , thanks for the try, but I think do will need to build the image first, because this docker-compose is using the image from docker hub.

Please, try again by doing these steps:

  1. Build the new image with:
docker build -t okbr/serenata-notebooks .
  1. and then try to start the environment with:
docker-compose up

I think it will works.

jtemporal commented 5 years ago

@thiagoalmeidasa I did the rebuild of the image before running the docker-compose up and it gave the error I reported previously.

I ran both with docker compose and "pure" docker and the error persisted.

willianpaixao commented 5 years ago

Hi @jtemporal I just double checked, rebuilding the image from scratch and re-running according to the comment above. The following log shows the containers are healthy and running:

$ docker-compose up
Creating network "okbr-serenata-notebooks" with the default driver
Creating okbr-serenata-notebooks ... done
Attaching to okbr-serenata-notebooks
okbr-serenata-notebooks    | [I 15:03:21.752 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
okbr-serenata-notebooks    | [W 15:03:21.944 NotebookApp] All authentication is disabled.  Anyone who can connect to this server will be able to run code.
okbr-serenata-notebooks    | [I 15:03:21.970 NotebookApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab
okbr-serenata-notebooks    | [I 15:03:21.970 NotebookApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
okbr-serenata-notebooks    | [I 15:03:21.972 NotebookApp] Serving notebooks from local directory: /home/jovyan
okbr-serenata-notebooks    | [I 15:03:21.972 NotebookApp] The Jupyter Notebook is running at:
okbr-serenata-notebooks    | [I 15:03:21.972 NotebookApp] http://(4430200b2577 or 127.0.0.1):8888/
okbr-serenata-notebooks    | [I 15:03:21.972 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
okbr-serenata-notebooks    | [I 15:03:44.806 NotebookApp] 302 GET / (172.18.0.1) 0.44ms

Would you please make sure you don't have older images, volumes or stopped containers and trying running it again?