chore: update env docker to have runtime lib path in LD_PRELOAD

- update the rest of the dockers, script and CI to stop setting LD_PRELOAD
This commit is contained in:
Arthur Meyre
2021-10-07 09:45:14 +02:00
parent 56e0ed4a11
commit 05e1227269
6 changed files with 8 additions and 25 deletions

View File

@@ -223,20 +223,12 @@ jobs:
- name: Source code Conformance
id: cs
if: ${{ steps.install-deps.outcome == 'success' && !cancelled() }}
env:
# TODO: remove this when JIT doesn't need this
# Required to be sure that docs reads all files with MLIR imports properly
LD_PRELOAD: /compiler/build/lib/Runtime/libZamalangRuntime.so
# pcc launches an internal target with proper flags
run: |
make pcc
- name: Build docs
id: cbd
if: ${{ steps.install-deps.outcome == 'success' && !cancelled() }}
env:
# TODO: remove this when JIT doesn't need this
# Required to be sure that docs reads all files with MLIR imports properly
LD_PRELOAD: /compiler/build/lib/Runtime/libZamalangRuntime.so
run: |
make docs
- name: Conformance status
@@ -259,23 +251,14 @@ jobs:
- name: PyTest Source Code
id: pytest
if: ${{ steps.conformance.outcome == 'success' && !cancelled() }}
env:
# TODO: remove this when JIT doesn't need this
LD_PRELOAD: /compiler/build/lib/Runtime/libZamalangRuntime.so
run: |
make pytest
- name: Test CodeBlocks
if: ${{ steps.conformance.outcome == 'success' && !cancelled() }}
env:
# TODO: remove this when JIT doesn't need this
LD_PRELOAD: /compiler/build/lib/Runtime/libZamalangRuntime.so
run: |
make test_codeblocks
- name: PyTest Notebooks
if: ${{ github.event_name == 'schedule' && steps.conformance.outcome == 'success' && !cancelled() }}
env:
# TODO: remove this when JIT doesn't need this
LD_PRELOAD: /compiler/build/lib/Runtime/libZamalangRuntime.so
run: |
make pytest_nb
- name: Test coverage
@@ -505,8 +488,7 @@ jobs:
if: ${{ success() && !cancelled() }}
run: |
echo "Running sanity check for ${RELEASE_IMG_GIT_TAG}"
docker run --rm --env LD_PRELOAD=/compiler/build/lib/Runtime/libZamalangRuntime.so \
-v "$(pwd)"/docker/release_resources:/data \
docker run --rm -v "$(pwd)"/docker/release_resources:/data \
"${RELEASE_IMG_GIT_TAG}" /bin/bash -c "python ./sanity_check.py"
docker image push --all-tags "${RELEASE_IMAGE_BASE}"
- name: Set notification report

View File

@@ -150,7 +150,7 @@ docker_publish_measurements: docker_build
@# Thus, we ran `extract_machine_info.py` script using native python
python script/progress_tracker_utils/extract_machine_info.py
docker run --rm --volume /"$$(pwd)":/src $(DEV_DOCKER_IMG) \
/bin/bash ./script/progress_tracker_utils/benchmark_and_publish_findings_in_docker.sh
/bin/bash ./script/progress_tracker_utils/benchmark_and_publish_findings_in_docker.sh
.PHONY: docker_publish_measurements
docs: clean_docs

View File

@@ -8,7 +8,6 @@ RUN echo "source /${SRC_DIR_NAME}/.docker_venv/bin/activate" >> /root/.bashrc &&
echo " source /${SRC_DIR_NAME}/.docker_venv/bin/activate" >> /root/.bashrc && \
echo " cd /${SRC_DIR_NAME}/ && make setup_env" >> /root/.bashrc && \
echo "fi" >> /root/.bashrc && \
echo "export LD_PRELOAD=/compiler/build/lib/Runtime/libZamalangRuntime.so" >> /root/.bashrc && \
echo "export MPLBACKEND=TkAgg" >> /root/.bashrc
WORKDIR /${SRC_DIR_NAME}

View File

@@ -14,3 +14,5 @@ RUN apt-get update && apt-get upgrade --no-install-recommends -y && \
rm -rf /var/lib/apt/lists/* && \
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir poetry
ENV LD_PRELOAD=${RT_LIB}:${LD_PRELOAD}

View File

@@ -1,4 +1,4 @@
FROM ghcr.io/zama-ai/zamalang-compiler:3a254bcb8725507a11538913d3d5e9657ac00043 as builder
FROM ghcr.io/zama-ai/zamalang-compiler:a9fae4c19b96ee61c7ea0a2ce26b1cd8d049e159 as builder
RUN apt-get update && apt-get upgrade --no-install-recommends -y && \
apt-get install --no-install-recommends -y \
@@ -14,7 +14,7 @@ COPY pyproject.toml ./pyproject.toml
RUN poetry build --format wheel
FROM ghcr.io/zama-ai/zamalang-compiler:3a254bcb8725507a11538913d3d5e9657ac00043
FROM ghcr.io/zama-ai/zamalang-compiler:a9fae4c19b96ee61c7ea0a2ce26b1cd8d049e159
RUN mkdir /pkg && mkdir /app
WORKDIR /pkg
@@ -30,13 +30,14 @@ RUN apt-get update && apt-get upgrade --no-install-recommends -y && \
graphviz* && \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install --no-cache-dir --upgrade pip wheel setuptools && \
echo "export LD_PRELOAD=/compiler/build/lib/Runtime/libZamalangRuntime.so" >> /root/.bashrc && \
echo "export MPLBACKEND=TkAgg" >> /root/.bashrc && \
python3 -m pip install --no-cache-dir ./*.whl && \
python3 -m pip install --no-cache-dir -r torch_requirements.txt \
-f https://download.pytorch.org/whl/torch_stable.html && \
python3 -m pip install --no-cache-dir -r release_requirements.txt
ENV LD_PRELOAD=${RT_LIB}:${LD_PRELOAD}
WORKDIR /app
COPY docker/release_resources/entry_point.sh ./entry_point.sh
RUN mkdir /data

View File

@@ -12,7 +12,6 @@ if ! source /src/.docker_venv/bin/activate; then
source /src/.docker_venv/bin/activate
cd /src/ && make setup_env
fi
export LD_PRELOAD=/compiler/build/lib/Runtime/libZamalangRuntime.so
initial_log=logs/$(date -u --iso-8601=seconds).log