chore(ci): fix gpu build on aws using docker

This commit is contained in:
Quentin Bourgerie
2023-01-06 17:53:23 +01:00
committed by David Testé
parent be2a377aaf
commit ca83b129b9
2 changed files with 6 additions and 9 deletions

View File

@@ -28,6 +28,7 @@ env:
RESULTS_FILENAME: parsed_benchmark_results_${{ github.sha }}.json
MAKE_RULE_TESTS: run-tests run-end-to-end-dataflow-tests
DOCKER_IMAGE_TEST: ghcr.io/zama-ai/concrete-compiler
DOCKER_GPU_OPTION:
CUDA_SUPPORT: OFF
CUDA_PATH: /usr/local/cuda-11.7
GCC_VERSION: 11
@@ -67,6 +68,7 @@ jobs:
run: |
echo "CUDA_SUPPORT=ON" >> "${GITHUB_ENV}"
echo "MAKE_RULE_TESTS=run-end-to-end-tests-gpu" >> "${GITHUB_ENV}"
echo "DOCKER_GPU_OPTION=--gpus all" >> "${GITHUB_ENV}"
# Free 4Gb of workspace
- name: Freeing space
@@ -97,7 +99,6 @@ jobs:
- name: Create build dir
run: mkdir build
# FIXME: GPU is not supported yet, docker image has to be rebuilt with CUDA first.
- name: Build compiler
uses: addnab/docker-run-action@v3
id: build-compiler
@@ -112,15 +113,9 @@ jobs:
-v ${{ github.workspace }}/build:/build
-v ${{ env.SSH_AUTH_SOCK }}:/ssh.socket
-e SSH_AUTH_SOCK=/ssh.socket
${{ env.DOCKER_GPU_OPTION }}
shell: bash
run: |
export CUDA_PATH=$CUDA_PATH
export LD_LIBRARY_PATH=$CUDA_PATH/lib:$LD_LIBRARY_PATH
export CC=$(which gcc)
export CXX=$(which g++)
export CUDAHOSTCXX=$CXX
export CUDACXX=$CUDA_PATH/bin/nvcc
set -e
cd /compiler
rm -rf /build/*
@@ -153,11 +148,13 @@ jobs:
-v ${{ github.workspace }}/compiler:/compiler
-v ${{ github.workspace }}/KeySetCache:/tmp/KeySetCache
-v ${{ github.workspace }}/build:/build
${{ env.DOCKER_GPU_OPTION }}
shell: bash
run: |
set -e
cd /compiler
pip install pytest
mkdir -p /tmp/concrete_compiler/gpu_tests/
make DATAFLOW_EXECUTION_ENABLED=ON CCACHE=ON Python3_EXECUTABLE=$PYTHON_EXEC BUILD_DIR=/build ${{ env.MAKE_RULE_TESTS }}
chmod -R ugo+rwx /tmp/KeySetCache

View File

@@ -14,7 +14,7 @@ security_group= ["sg-0bf1c1d79c97bc88f", ]
[profile.gpu]
region = "us-east-1"
image_id = "ami-03deb184ab492226b"
image_id = "ami-0c4773f5626d919b6"
instance_type = "p3.2xlarge"
subnet_id = "subnet-8123c9e7"
security_group= ["sg-0f8b52622a2669491", ]