docker_service
所属分类:数值算法/人工智能
开发工具:Dockerfile
文件大小:6KB
下载次数:0
上传日期:2020-12-18 06:48:03
上 传 者:
sh-1993
说明: docker_service,docker容器作为ssh服务器
(docker_service,Docker container as ssh server)
文件列表:
LICENSE (1065, 2020-12-18)
build_image (0, 2020-12-18)
build_image\CPU (0, 2020-12-18)
build_image\CPU\Dockerfile (610, 2020-12-18)
build_image\GPU (0, 2020-12-18)
build_image\GPU\Dockerfile (614, 2020-12-18)
build_image\docker-compose.yml (196, 2020-12-18)
env_pytorch (0, 2020-12-18)
env_pytorch\docker-compose.yml (202, 2020-12-18)
neurosim_env (0, 2020-12-18)
neurosim_env\docker-compose.yml (236, 2020-12-18)
synology_dev (0, 2020-12-18)
synology_dev\docker-compose.yml (170, 2020-12-18)
tvm_dev (0, 2020-12-18)
tvm_dev\docker-compose.yml (236, 2020-12-18)
# docker_service
Docker container as ssh server with NVIDIA GPU enabled
## Package required
* NVIDIA driver (It will be installed automatically in Ubuntu 20.04 LTS)
* Docker v19.03.13
* nvidia-docker2 v2.5.0-1
* docker-compose v1.27.4
## Notes
The latest ``nvidia-docker`` is integrated with ``docker-compose`` now, make sure you install the latest version of ``nvidia-docker`` and ``docker-compose``.
To install the latest version of docker, docker-compose and nvidia-docker, make sure installing them from Docker official APT repo, Pypl, and NVIDIA APT repo respectively.
## 1. Build ssh enabled image
First, you need to build a ssh enabled image to launch CAAS (container as a service).
The default base image is ``jerry_zj/dev_basic_gpu``, you can edit the Dockerfile under
``build_image`` directory to your own image.
The name of the ssh enabled image is set to ``dev_basic_gpu_server`` by default, you can name your own image by edit ``docker-compose.yml`` under ``build_image`` directory.
The default command will build CPU and GPU images simultaneously
```shell
cd build_image
docker-compose build
```
If you want to build image for CPU only, use
```shell
cd build_image
docker-compose build cpu
```
## 2. Use docker-compose to start a server
After the image is built, you can use the following command to start a container
In ``tvm_dev``, we will mount your home directory to the container by default, you can specify a certain path instead.
```shell
cd tvm_dev
docker-compose up -d
```
## 3. Connect to the container
Note that using the specified port in ``docker-compose.yml``
```shell
ssh -p$SPECIFIED_PORT root@$Hostname
```
近期下载者:
相关文件:
收藏者: