How to “Docker” for your computer science research project?

How to “Docker” for your computer science research project?

When everyone is discussing dockers, talking about how good it is to dockerize your project, because it is like an isolated environment, people can just run your docker image without setting up dependencies.

When everyone is discussing dockers, talking about how good it is to dockerize your project, because it is like an isolated environment, people can just run your docker image without setting up dependencies.

I am currently working on deep learning research and my boss asked me to put my research project into a docker. So it took me some time to understand what is docker and how to use it with minimal understanding.

It is a minimal understanding, therefore it might not be the correct way to use docker, but I found out it suits my usage as a researcher so I decided to share it!

What is a docker?

I am explaining it by my experience, not from the definition of Google. If you know what is a virtual machine, it is like an emulator of another computer (e.g. ubuntu) in your current computer. Docker is like a similar one, just that it is a faster and better virtual machine (deep inside is quite different and complicated). It is an isolated environment, a new computer!

How to install?

This website has very clear instructions on installing docker in your ubuntu https://phoenixnap.com/kb/how-to-install-docker-on-ubuntu-18-04. After you installed it, try running “docker --version” and you have installed successfully if outputs are shown!

I want to use docker without installing any package!

The reason I use docker for all my projects is that I don’t need to setup CUDA stuff in a new computer (as you know, CUDA stuff very complicated, I messed up my ubuntu a few times). Of course, some times I am lazy to install dependencies, docker is best for me!

If you are messing with Deep Learning now, most probably you will use either PyTorch or Tensorflow.

Without docker, you may need to install Anaconda3, python3, new ubuntu, setting up CUDA, pip install, conda install. But with docker, want you need to do is just two commands.

docker pull pytorch/pytorch:latest ## will be downloading the “image”, or you can get it as it is installing the environment

docker run -it --rm --gpus all pytorch/pytorch bash

If you face “permission error”, just run with sudo, because I have set up running docker without sudo.

Image for post

Image for post

This is the interface after you run the command (I tagged the original image with the name “pt1.4”)

Now you have entered the “virtual machine” (it is called “container”, whenever I talked about “container”, it means I am talking about this “virtual machine”), notice that you are “root” in this container, later I will talk about how to get rid of “root”.

Image for post

Image for post

In this “virtual machine”, you can do anything like a normal ubuntu environment.

You can refer to pytorch repository in Dockerhub for other versions of pytorch: https://hub.docker.com/r/pytorch/pytorch

docker research

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Docker Explained: Docker Architecture | Docker Registries

Following the second video about Docker basics, in this video, I explain Docker architecture and explain the different building blocks of the docker engine; docker client, API, Docker Daemon. I also explain what a docker registry is and I finish the video with a demo explaining and illustrating how to use Docker hub.

Docker Tutorial for Beginners 8 - Build and Run C++ Applications in a Docker Container

Welcome to this on Docker Tutorial for Beginners. In this video provides an Introduction on C++ development with Docker containers. So we will see How to ship C++ Programs in Docker.

WordPress in Docker. Part 1: Dockerization

This entry-level guide will tell you why and how to Dockerize your WordPress projects.

Docker manifest - A peek into image's manifest.json files

The docker manifest command does not work independently to perform any action. In order to work with the docker manifest or manifest list, we use sub-commands along with it. This manifest sub-command can enable us to interact with the image manifests. Furthermore, it also gives information about the OS and the architecture, that a particular image was built for. The image manifest provides a configuration and a set of layers for a container image. This is an experimenta

List all containers in Docker(Docker command)

We can get a list of all containers in docker using `docker container list` or `docker ps` commands.