|
| 1 | +Preliminaries |
| 2 | +``` |
| 3 | +Ensure nvidia-smi is work on your host machine. |
| 4 | +``` |
| 5 | + |
| 6 | +There is a prebuilt docker image, tested on a amd64 machine, with Ubuntu 24.04 LTS. |
| 7 | +``` |
| 8 | +docker pull ghcr.io/bigjohnn/zeroth-bot-sim:v1 |
| 9 | +``` |
| 10 | + |
| 11 | +But if that not work, maybe you can build it by yourself. |
| 12 | + |
| 13 | +Make some changes in your Dockerfile && docker-compose.yml. |
| 14 | +``` |
| 15 | +PREBUILD a docker image that have external dependencies |
| 16 | +
|
| 17 | +# 1stly, to build zeroth-bot-sim:v0 |
| 18 | +# FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu20.04 |
| 19 | +
|
| 20 | +# COPY sources.list /etc/apt/sources.list |
| 21 | +
|
| 22 | +# RUN mkdir /root/.pip |
| 23 | +# COPY pip.conf /root/.pip/pip.conf |
| 24 | +
|
| 25 | +# RUN apt install -y wget zlib1g-dev libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev libtk8.6 libgdm-dev libdb4o-cil-dev libpcap-dev |
| 26 | +# RUN wget https://mirrors.huaweicloud.com/python/3.8.19/Python-3.8.19.tar.xz && tar -xvf Python-3.8.19.tar.xz |
| 27 | +
|
| 28 | +# WORKDIR /root/Python-3.8.19 |
| 29 | +# RUN ./configure --prefix=/usr/local && make && make install |
| 30 | +
|
| 31 | +# WORKDIR /usr/local/bin/ |
| 32 | +# RUN ln -s pip3 pip |
| 33 | +
|
| 34 | +# WORKDIR /app/sim/ |
| 35 | +# RUN make install-dev |
| 36 | +
|
| 37 | +# RUN wget https://developer.nvidia.com/isaac-gym-preview-4 |
| 38 | +# # RUN tar -xvf |
| 39 | +# RUN make install-third-party-external |
| 40 | +
|
| 41 | +``` |
| 42 | + |
| 43 | +Then, |
| 44 | + |
| 45 | +Terminal1: |
| 46 | +``` |
| 47 | +docker-compose up --build |
| 48 | +``` |
| 49 | + |
| 50 | +``` |
| 51 | +ARNING: Found orphan containers (a55a8ae7a762_docker_my_cuda_service_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. |
| 52 | +Building my-service |
| 53 | +[+] Building 1.6s (10/10) FINISHED docker:default |
| 54 | + => [internal] load build definition from Dockerfile 0.2s |
| 55 | + => => transferring dockerfile: 348B 0.0s |
| 56 | + => [internal] load metadata for docker.io/nvidia/cuda:12.1.0-cudnn8-devel-ubuntu20.04 0.0s |
| 57 | + => [internal] load .dockerignore 0.2s |
| 58 | + => => transferring context: 2B 0.0s |
| 59 | + => [1/5] FROM docker.io/nvidia/cuda:12.1.0-cudnn8-devel-ubuntu20.04 0.0s |
| 60 | + => [internal] load build context 0.2s |
| 61 | + => => transferring context: 34B 0.0s |
| 62 | + => CACHED [2/5] WORKDIR /app 0.0s |
| 63 | + => CACHED [3/5] COPY sources.list /etc/apt/sources.list 0.0s |
| 64 | + => CACHED [4/5] RUN apt update 0.0s |
| 65 | + => CACHED [5/5] WORKDIR /app/sim/ 0.0s |
| 66 | + => exporting to image 0.2s |
| 67 | + => => exporting layers 0.0s |
| 68 | + => => writing image sha256:8e9c02e6c8b50dcbf7d6d1962d51de926126f132b65b65952ad8dfc74634f8c6 0.0s |
| 69 | + => => naming to docker.io/library/docker_my-service 0.1s |
| 70 | +WARNING: Image for service my-service was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`. |
| 71 | +Creating docker_my-service_1 ... done |
| 72 | +Attaching to docker_my-service_1 |
| 73 | +my-service_1 | |
| 74 | +my-service_1 | ========== |
| 75 | +my-service_1 | == CUDA == |
| 76 | +my-service_1 | ========== |
| 77 | +my-service_1 | |
| 78 | +my-service_1 | CUDA Version 12.1.0 |
| 79 | +my-service_1 | |
| 80 | +my-service_1 | Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 81 | +my-service_1 | |
| 82 | +my-service_1 | This container image and its contents are governed by the NVIDIA Deep Learning Container License. |
| 83 | +my-service_1 | By pulling and using the container, you accept the terms and conditions of this license: |
| 84 | +my-service_1 | https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license |
| 85 | +my-service_1 | |
| 86 | +my-service_1 | A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience. |
| 87 | +my-service_1 | |
| 88 | +my-service_1 | ************************* |
| 89 | +my-service_1 | ** DEPRECATION NOTICE! ** |
| 90 | +my-service_1 | ************************* |
| 91 | +my-service_1 | THIS IMAGE IS DEPRECATED and is scheduled for DELETION. |
| 92 | +my-service_1 | https://gitlab.com/nvidia/container-images/cuda/blob/master/doc/support-policy.md |
| 93 | +my-service_1 | |
| 94 | +``` |
| 95 | + |
| 96 | +Terminal2: |
| 97 | + |
| 98 | +``` |
| 99 | +docker exec -it docker_zeroth-sim_1 /bin/bash |
| 100 | +``` |
| 101 | + |
| 102 | +``` |
| 103 | +gymuser@06aac36e0751:/app/sim# python3 sim/train.py --task=stompymicro --num_envs=4 |
| 104 | +``` |
0 commit comments