Skip to content

Commit

Permalink
Merge pull request #294 from jaybdub/jp_411_pub
Browse files Browse the repository at this point in the history
Jp 411 pub
  • Loading branch information
tokk-nv authored Oct 22, 2020
2 parents ccdf648 + 9b17f12 commit be36fbb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docker/base/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ then
BASE_IMAGE=nvcr.io/nvidia/l4t-pytorch:r32.4.3-pth1.6-py3
elif [[ "$L4T_VERSION" == "32.4.4" ]]
then
BASE_IMAGE=nvcr.io/ea-linux4tegra/l4t-pytorch:r32.4.4-pth1.6-py3
BASE_IMAGE=nvcr.io/nvidia/l4t-pytorch:r32.4.4-pth1.6-py3
fi

sudo docker build \
Expand Down
15 changes: 14 additions & 1 deletion docker/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,20 @@ then
export JETBOT_DOCKER_REMOTE=jetbot
elif [[ "$L4T_VERSION" == "32.4.4" ]]
then
export JETBOT_DOCKER_REMOTE=nvcr.io/ea-linux4tegra
export JETBOT_DOCKER_REMOTE=jetbot
fi

./set_nvidia_runtime.sh
sudo systemctl enable docker

# check system memory
SYSTEM_RAM_KILOBYTES=$(awk '/^MemTotal:/{print $2}' /proc/meminfo)

if [ $SYSTEM_RAM_KILOBYTES -gt 3000000 ]
then
export JETBOT_JUPYTER_MEMORY=500m
export JETBOT_JUPYTER_MEMORY_SWAP=3G
fi



2 changes: 2 additions & 0 deletions docker/enable.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
source configure.sh

JUPYTER_WORKSPACE=${1:-$HOME} # default to $HOME
JETBOT_CAMERA=${2:-opencv_gst_camera} # default to opencv

Expand Down
24 changes: 1 addition & 23 deletions docs/software_setup/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,12 @@ cd jetbot

Optionally, you can execute this script (`./scripts/re_enable_gui.sh`).

Next, source the [``docker/configure.sh``](https://github.com/NVIDIA-AI-IOT/jetbot/blob/master/docker/configure.sh) script to configure various environment variables related to JetBot docker.

```bash
cd docker
source configure.sh
```

Finally, if you haven't already, set the default docker runtime to NVIDIA using [``docker/set_nvidia_runtime.sh``](https://github.com/NVIDIA-AI-IOT/jetbot/blob/master/docker/set_nvidia_runtime.sh). This is needed to use
CUDA related components with the containers.

```bash
./set_nvidia_runtime.sh
```

If needed, you can also set memory limits on the Jupyter container.

```bash
export JETBOT_JUPYTER_MEMORY=500m
export JETBOT_JUPYTER_MEMORY_SWAP=3G
```


## Step 5 - Enable all containers

Call the following to enable the JetBot docker containers

```bash
sudo systemctl enable docker # enable docker daemon at boot
cd docker
./enable.sh $HOME # we'll use home directory as working directory, set this as you please.
```

Expand Down

0 comments on commit be36fbb

Please sign in to comment.