Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Docker refactor, parameterizes OS and compiler versions. #267

Merged
merged 6 commits into from
Sep 27, 2022

Conversation

wmaxey
Copy link
Member

@wmaxey wmaxey commented Apr 15, 2022

Ideally we instead generate one layer that handles all dialects.

CMake demands a CUDA Toolkit be present, currently internal builds of the runtime do not satisfy that requirement so we must still sync from nvcr.io.

@wmaxey wmaxey force-pushed the build/docker_refactor branch from 065362d to 5589926 Compare April 19, 2022 03:08
@wmaxey wmaxey force-pushed the build/docker_refactor branch from 5589926 to 7414de3 Compare April 27, 2022 22:53
@wmaxey wmaxey added this to the 1.8.1 milestone Apr 28, 2022
@wmaxey wmaxey force-pushed the build/docker_refactor branch from 6e92dd2 to 72c032c Compare May 6, 2022 18:32
@wmaxey wmaxey modified the milestones: 1.8.1, 1.9.0 May 27, 2022
@wmaxey wmaxey force-pushed the build/docker_refactor branch 2 times, most recently from a19733e to 369fd23 Compare July 27, 2022 20:44
Copy link
Collaborator

@miscco miscco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This already looks great.

I am super looking forward to using this


ADD . /libcudacxx

# Install compiler and configure project
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this really install the compiler?

# Released under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.

# ARG BASE_IMAGE=nvcr.io/nvidia/nvhpc:22.3-devel-cuda_multi-ubuntu20.04
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should that be something conditional like below

if [ ${NVCXX_ENABLED} ]; then
BASE_IMAGE="nvcr.io/nvidia/nvhpc:22.3-devel-cuda_multi-ubuntu20.04"
else
BASE_IMAGE="nvcr.io/nvidia/cuda:11.7.0-devel-ubuntu22.04"
fi;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no conditionals in dockerfiles, it can only be parameterized.

At least I think.

EMPTY_DIR=$(mktemp -d)

LIBCUDA=$(ldconfig -p | grep libcuda.so | tr ' ' '\n' | grep / | head -n 1 | tr '\n' ' ' | sed 's/ *$//')
LIBNVIDIAPTXJITCOMPILER=$(ldconfig -p | grep libnvidia-ptxjitcompiler.so | tr ' ' '\n' | grep / | head -n 1 | tr '\n' ' ' | sed 's/ *$//')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add some underscores here to make it somewhat readable?

@wmaxey wmaxey force-pushed the build/docker_refactor branch 2 times, most recently from 1233ac9 to 6e81028 Compare August 12, 2022 06:14
* Works seemlessly with VSCode + Docker extension.
* manual bringup: `docker compose up --profile clang-14` or whatever compiler
@wmaxey wmaxey force-pushed the build/docker_refactor branch from db268c9 to 2e34809 Compare September 25, 2022 07:16
@wmaxey
Copy link
Member Author

wmaxey commented Sep 25, 2022

@miscco Give this a shot, on Windows + VSCode it's pretty stellar.

@wmaxey wmaxey changed the title WIP: Docker refactor, parameterizes OS and compiler versions. Docker refactor, parameterizes OS and compiler versions. Sep 26, 2022
@wmaxey wmaxey marked this pull request as ready for review September 26, 2022 22:09
@wmaxey wmaxey requested a review from griwes September 26, 2022 22:09
@wmaxey wmaxey requested a review from miscco September 27, 2022 09:12
Copy link
Collaborator

@miscco miscco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am loving it!

@wmaxey wmaxey merged commit de18f38 into main Sep 27, 2022
@wmaxey wmaxey deleted the build/docker_refactor branch September 27, 2022 22:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants