Skip to content

Commit 7204dcd

Browse files
authored
Centos8 support in dockers (#841)
* centos8 * Adding centos8 support in a docker * PR comments
1 parent 5e2de0a commit 7204dcd

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ workflows:
572572
osnick:
573573
- xenial
574574
- bionic
575+
- centos8
575576
lite:
576577
- "REDISAI_LITE=0 PUBLISH=1"
577578
- "REDISAI_LITE=1"

opt/build/docker/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,19 @@ endif
3030

3131
# remap ubuntu versions because of nvidia cuda
3232
ifeq ($(OSNICK),xenial)
33-
REDIS_CUDA_UBUNTUVERSION=16.04
33+
REDIS_CUDA_MAPVERSION=ubuntu16.04
3434
endif
3535
ifeq ($(OSNICK),bionic)
36-
REDIS_CUDA_UBUNTUVERSION=18.04
36+
REDIS_CUDA_MAPVERSION=ubuntu18.04
37+
endif
38+
ifeq ($(OSNICK),centos8)
39+
REDIS_CUDA_MAPVERSION=centos8
3740
endif
3841

3942
DOCKERWRAPPER_EXTRA_VARS=\
4043
REDISAI_LITE=${REDISAI_LITE} \
4144
REDIS_CUDA_VERSION=${REDIS_CUDA_VERSION} \
42-
REDIS_CUDA_UBUNTUVERSION=${REDIS_CUDA_UBUNTUVERSION}
45+
REDIS_CUDA_MAPVERSION=${REDIS_CUDA_MAPVERSION}
4346

4447
### Defaults ###
4548
ROOT=../../..

opt/build/docker/dockerfile.tmpl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG TEST={{REDIS_TEST}}
99
#----------------------------------------------------------------------------------------------
1010
FROM redisfab/redis:{{REDIS_VERSION}}-{{REDIS_ARCH}}-{{REDIS_OSNICK}} AS redis
1111
{% if gpu_build is defined %}
12-
FROM nvidia/cuda:{{REDIS_CUDA_VERSION}}-devel-ubuntu{{REDIS_CUDA_UBUNTUVERSION}} AS builder
12+
FROM nvidia/cuda:{{REDIS_CUDA_VERSION}}-devel-{{REDIS_CUDA_MAPVERSION}} AS builder
1313
{% else %}
1414
FROM {{REDIS_OS}} AS builder
1515
{% endif %}
@@ -31,10 +31,8 @@ COPY ./opt/ opt/
3131
ADD ./tests/flow/ tests/flow/
3232

3333
RUN FORCE=1 ./opt/readies/bin/getpy3
34+
RUN ./opt/readies/bin/getupdates
3435
RUN ./opt/system-setup.py
35-
RUN apt-get update -qq
36-
RUN apt-get upgrade -yqq
37-
RUN rm -rf /var/cache/apt
3836

3937
ARG DEPS_ARGS=""
4038
COPY ./get_deps.sh .
@@ -63,7 +61,7 @@ RUN set -e ;\
6361

6462
#----------------------------------------------------------------------------------------------
6563
{% if gpu_build is defined %}
66-
FROM nvidia/cuda:{{REDIS_CUDA_VERSION}}-runtime-ubuntu{{REDIS_CUDA_UBUNTUVERSION}}
64+
FROM nvidia/cuda:{{REDIS_CUDA_VERSION}}-runtime-{{REDIS_CUDA_MAPVERSION}}
6765
{% else %}
6866
FROM redisfab/redis:{{REDIS_VERSION}}-{{REDIS_ARCH}}-{{REDIS_OSNICK}}
6967
{% endif %}

opt/build/docker/templates/gpu.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# given the cuda version, generate the paths so that we don't manually maintain them
22
{% set cuda_list = REDIS_CUDA_VERSION.split("-") %}
3+
{% set cuda_version = cuda_list[0] %}
34
ENV NVIDIA_VISIBLE_DEVICES all
45
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
5-
RUN echo export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda-{{cuda_list[0]}}/lib64:$LD_LIBRARY_PATH > /etc/profile.d/cuda.sh
6+
RUN echo export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda-{{cuda_version}}/lib64:/usr/local/cuda-{{cuda_version}}/compat/:$LD_LIBRARY_PATH > /etc/profile.d/cuda.sh
67

opt/system-setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def common_first(self):
2020
self.install_downloaders()
2121
self.pip_install("wheel")
2222

23-
self.install("git unzip patchelf")
23+
self.install("git unzip")
2424
if self.osnick != 'centos8':
2525
self.install("coreutils") # for realpath
2626

@@ -71,9 +71,9 @@ def macos(self):
7171
def common_last(self):
7272
self.run("%s/bin/getclang --format" % READIES)
7373
if self.platform == "arm":
74-
self.run("%s/bin/getcmake" % READIES)
74+
self.run("%s/bin/getcmake --from-repo" % READIES)
7575
else:
76-
self.run("%s/bin/getcmake --no-repo" % READIES)
76+
self.run("%s/bin/getcmake" % READIES)
7777

7878
self.run("{PYTHON} {READIES}/bin/getrmpytools".format(PYTHON=self.python, READIES=READIES))
7979

0 commit comments

Comments
 (0)