Skip to content

Jetson Builds #805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,26 @@ jobs:
name: Run QA Automation (AILite)
command: MODULE_VERSION=$CIRCLE_TAG VERBOSE=1 TEST=release VARIANT=light ./tests/qa/run

build-jetson-platform:
machine:
resource_class: arm.medium
image: ubuntu-2004:202101-01

steps:
- abort_for_docs
- abort_for_noci
- early_return_for_forked_pull_requests
- relocate-docker-storage
- checkout-all
- setup-automation
- run:
name: Build
command: |
pip3 install --user jinja2
pushd opt/build/docker
docker login -u redisfab -p $DOCKER_REDISFAB_PWD
make REDIS_JETSON=1 PACK=0 TEST=0 VERBOSE=1 PUBLISH=1
no_output_timeout: 40m

#nightly-automation:
# docker:
Expand Down Expand Up @@ -559,6 +579,10 @@ workflows:
- build-and-test-gpu-for-forked-prs:
<<: *on-any-branch
<<: *after-linter
- build-jetson-platform:
context: common
<<: *after-build-and-test
<<: *on-master-version-tags-and-dockertests
- platforms-build:
context: common
<<: *after-build-and-test
Expand Down
83 changes: 0 additions & 83 deletions Dockerfile.arm

This file was deleted.

102 changes: 0 additions & 102 deletions Dockerfile.jetson

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ For docker instance with GPU support, you can launch it from `tensorwerk/redisai

```sh
docker run -p 6379:6379 --gpus all -it --rm redislabs/redisai:edge-gpu


```

For a docker instance on an arm device we currently support CUDA 10.2 and CUDNN 7 - built on the nvidia jetson and xavier devices. The docker images below, are specific to those devices, and contain only the pytorch backend.
```sh
docker run -p 6379:6379 --gpus all -it --rm redislabs/redisai:edge-gpu-jetson
```

But if you'd like to build the docker image, you need a machine that has Nvidia driver (CUDA 10.0), nvidia-container-toolkit and Docker 19.03+ installed. For detailed information, checkout [nvidia-docker documentation](https://github.com/NVIDIA/nvidia-docker)
Expand Down
5 changes: 5 additions & 0 deletions get_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ error() {
exit 1
}

set -x

trap error ERR

HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
Expand Down Expand Up @@ -202,6 +204,9 @@ fi # WITH_TFLITE
###################################################################################### LIBTORCH

PT_VERSION="1.7.1"
if [[ $JETSON == 1 ]]; then
PT_VERSION="1.7.0"
fi

if [[ $WITH_PT != 0 ]]; then
[[ $FORCE == 1 ]] && rm -rf $LIBTORCH
Expand Down
57 changes: 16 additions & 41 deletions opt/build/docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,68 +1,43 @@
# Feel free to change these
PRODUCT=redisai
DOCKER_ORG=redislabs
REDIS_VERSION=6.2.4
REDIS_CUDA_VERSION=11.0-cudnn8
REDISAI_LITE=0
export REDIS_VERSION=6.2.4
export REDIS_CUDA_VERSION=11.0-cudnn8
export REDISAI_LITE=0

PACK=1 # to fetch the artifacts

DOCKER_OPTS= # set, to pass custom options to docker, but remember to quote them
TEST=1 # because dockers
OSNICK ?= bionic

# set to pass multiple directories as docker sources to include in templates
DOCKER_SOURCES=""

# set, to generate a file named Dockerfile<suffix>, i.e useful when you want to run things in parallel
DOCKER_SUFFIX=

# Add space delimited docker tags, and they'll all be applied
DOCKER_TAGS=

DEFAULT_TAG=${DOCKER_ORG}/${PRODUCT}:${VERSION}-cpu-${OSNICK}

# jetson flavour
ifdef REDIS_JETSON
export REDIS_JETSON=1
export REDIS_CUDA_VERSION=10.2-cudnn7
DOCKER_SUFFIX=.jetson
DOCKER_ARGS=gpu_build=1
DEFAULT_TAG=${DOCKER_ORG}/${PRODUCT}:${VERSION}-gpu-jetson
endif

# set gpu arguments
ifeq ($(GPU),1)
DOCKER_ARGS = gpu_build=1
DOCKER_SUFFIX=gpu
DOCKER_SUFFIX=.gpu
DEFAULT_TAG=${DOCKER_ORG}/${PRODUCT}:${VERSION}-gpu-${OSNICK}
endif

# remap ubuntu versions because of nvidia cuda
ifeq ($(OSNICK),xenial)
REDIS_CUDA_UBUNTUVERSION=16.04
export REDIS_CUDA_UBUNTUVERSION=16.04
endif
ifeq ($(OSNICK),bionic)
REDIS_CUDA_UBUNTUVERSION=18.04
export REDIS_CUDA_UBUNTUVERSION=18.04
endif

DOCKERWRAPPER_EXTRA_VARS=\
REDISAI_LITE=${REDISAI_LITE} \
REDIS_CUDA_VERSION=${REDIS_CUDA_VERSION} \
REDIS_CUDA_UBUNTUVERSION=${REDIS_CUDA_UBUNTUVERSION}

### Defaults ###
ROOT=../../..
READIES=${ROOT}/opt/readies

#------------------------------------------------------------------------------
define HELP
make build # build and optionally publish the docker, from a template file
OSNICK=<> # base operating system
REDISAI_LITE=1 # enable RedisAI lite builds
DOCKER_SUFFIX=<> # optional suffix for the generated dockerfile
DOCKER_ARGS=FOO=BAR # key-value pairs of variables to pass into the docker build
PACK=1 # fetch generated artifacts
DOCKER_TAGS=a,b,c # tags to append and push to dockerhub
DEFAULT_TAG=redislabs/redisai # default docker tag to build, and push
TEST=1 # run tests, if specified
VERSION=x.y.z # set the docker version
NOP=1 # set to echo files in docker generation, and not run
DOCKER_SOURCES=/a/path # append paths to the template generator
PUBLISH=1 # if set, push to dockerhub (requires docker login)
DOCKER_OPTS=XXX # Options to pass to the docker build command
endef
#------------------------------------------------------------------------------

# rules, for building
include ${READIES}/mk/docker.rules
Loading