Skip to content

Commit

Permalink
Update CPU build to Ubuntu 20.04 (#1009)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdahm authored Jul 7, 2020
1 parent 9a61e10 commit a132ad9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# IMAGE needs be be set to one of the docker/dawn-env.dockerfile images
ARG IMAGE=gtclang/dawn-env-ubuntu19.10
ARG IMAGE=gtclang/dawn-env-ubuntu20.04
FROM $IMAGE
ARG BUILD_TYPE=Release
COPY . /usr/src/dawn
Expand Down
9 changes: 0 additions & 9 deletions docker/ubuntu19.10.dockerfile

This file was deleted.

17 changes: 17 additions & 0 deletions docker/ubuntu20.04.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ubuntu:focal
RUN apt update && apt install -y --no-install-recommends \
apt-transport-https ca-certificates \
gnupg software-properties-common curl && apt clean
# Add CMake repo
RUN curl -L https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add -
RUN apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
RUN apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal-rc main'
RUN apt-get install kitware-archive-keyring && apt clean
RUN apt update && apt install -y --no-install-recommends \
build-essential ninja-build cmake git openssh-client curl \
llvm-9-dev libclang-9-dev libclang-cpp9 \
python3 python3-pip libpython3-dev \
python3-setuptools python3-wheel \
libboost-dev && apt clean
RUN python3 -m pip install --upgrade pip
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
23 changes: 8 additions & 15 deletions docker/update-images
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,27 @@ if [ $# -eq 0 ]; then
usage
fi

if [ "$1" = "-s" ]; then
cmd_prefix="sudo"
shift
else
cmd_prefix=""
fi

while [ "$1" != "" ]; do
case $1 in
c | cpu)
image_name=gtclang/dawn-env-ubuntu19.10
$cmd_prefix docker build --rm \
image_name=gtclang/dawn-env-ubuntu20.04
docker build --rm \
--tag $image_name-base \
--file docker/ubuntu19.10.dockerfile .
$cmd_prefix docker build --rm \
--file docker/ubuntu20.04.dockerfile .
docker build --rm \
--tag $image_name --build-arg IMAGE=$image_name-base \
--file docker/dawn-env.dockerfile .
echo "Now run:\n\t$cmd_prefix docker push $image_name"
echo "Now run:\n\tdocker push $image_name"
;;
g | gpu)
image_name=gtclang/dawn-env-cuda10.1-ubuntu18.04
$cmd_prefix docker build --rm \
docker build --rm \
--tag $image_name-base \
--file docker/cuda10.1-ubuntu18.04.dockerfile .
$cmd_prefix docker build --rm \
docker build --rm \
--tag $image_name --build-arg IMAGE=$image_name-base \
--file docker/dawn-env.dockerfile .
echo "Now run:\n\t$cmd_prefix docker push $image_name"
echo "Now run:\n\tdocker push $image_name"
;;
*)
usage
Expand Down

0 comments on commit a132ad9

Please sign in to comment.