My Docker Installation Experience

a little robot stares at a keyboard somehow looking either focused or distressed even though it has no emotional features other than posture

setting up environments can be a pain

Docker desktop installation won’t work for me at all as described on the website. I could have tried a bit longer to get that working, but I’m actually pretty interested in learning more about how docker works. I think it’s a great tool, and have remained largely ignorant on how to properly use it over the years.

So below I’ll walk through my process of installing Docker Engine on Ubuntu 22.04.

Installation Links

Note 1: The tensorflow installation was huge, Multiple gigabytes. I had the space available so I wasn’t too concerned, but be aware it’s a big fella.

Note 2: After getting Docker engine and permission issues sorted this process was much smoother than I originally anticipated.

Permission Levels

The install links above give you the option to copy the terminal commands from the browser. For my installation type though, it was required to have sudo permission, and my python version is named. Otherwise, they worked like a charm.

Below are the only updates I needed to make to test that tensorflow did actually work in the docker container. Updates are in purple.

 

sudo docker run -it --rm tensorflow/tensorflow 

python3 -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

 

The output is kinda garbled up, but it was at least legible enough for me to understand that it worked.


Jupyter Notebook Test

a screenshot showing a jupyter notebook that is running on docker container

Screenshot of my local after spinning up the docker container

This was really cool. The docker container spins up, starts a server, and I can visit that in the browser at the address provided in the Terminal. Here is a screenshot of that.

The notebook was full of neat stuff and I won’t put it all here as that’s part of the fun of it. But it’s definitely cool to be running a Jupyter notebook on a docker container, because now in theory I can get this running in anyplace I need.

Conclusion

I expected more work here. But I started the post, and maybe it’ll help somebody so I’m posting it. Gotta get in the habit of not throwing away my work.

Previous
Previous

A Tensorflow “Hello, World!”

Next
Next

Automating the process of ‘When to water’