≡ menu
× menu

cnnmmd

Installation: Container: Windows (Docker Desktop (WSL2))


Obtain and extract the container app package from:

https://docs.docker.jp/desktop/install/windows-install.html

Start the container (you'll be prompted for a few things, but you can just "skip" them the first time):

> docker desktop

Add Ubuntu's WSL to the managed containers (you can do this after installing Ubuntu from the terminal):

> docker desktop
> settings
 
> resources
   
> wsl integration
     
> enable integration with additional distros:
       
> ubuntu: <yes>
       
> [apply & restart]

Installation: Container: Windows (WSL2 (Docker))


The content is being prepared.


*
It is no different from installing Docker on regular Linux (Ubuntu).

Usage:Container:Permissions


This tool shares some folders between the container and the host (PC). Therefore, if there is a discrepancy in permissions between the container and the host (PC), problems will occur. For example, if you are using it in the following way:

The container is running as a normal user with changed group permissions (usermod -aG docker ...)

It needs to be transformed into the following form:

Run the container as administrator (root)
Run the container as a normal user using rootless mode (Rootless mode)
The virtual environment in which the container runs has appropriate permissions (macOS (Docker Desktop))

Use: Container: Storage


In the case of Windows and macOS, containers run in a virtual environment, so you will need to allocate storage space for them.

Basically, the storage space used by a virtual environment increases as you use it - so it won't be a problem at first, but you can't reduce it - you might want to set a limit on usage, so here are some estimates for the total storage space when using this tool on Linux (Ubuntu) in WSL2: [※1][※2]

16 - 18 GB ... Use the CPU containers for trial purposes
32 - 36 GB …… Use CPU containers to a certain extent
64 - 70 GB …… Use a fair amount of GPU containers

There is a big difference in size between the CPU and GPU containers. This is because the GPU-related files (Pytorch's CUDA-related files) are very large. The difference in size between containers with the same environment is as follows:

2-3 GB ... if the container is designed for CPU
10 GB - if you create a container for GPU

*1
You can shrink the unused space by backing up and restoring the virtual environment, but this is a bit of a hassle (on macOS, you can also reduce it from the Docker Desktop UI, depending on the state of the virtual environment).
*2
For WSL2, the storage limit for a virtual environment can be specified (in bytes) in the following file, located in the user folder:
.wslconfig (defaultVhdSize)