diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 046ef0d2397..00000000000 --- a/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -# ASV -.asv/ -pkgs/ diff --git a/Dockerfile-benchmarks-fragmented b/Dockerfile-benchmarks-fragmented deleted file mode 100644 index 03f59eded72..00000000000 --- a/Dockerfile-benchmarks-fragmented +++ /dev/null @@ -1,96 +0,0 @@ -FROM condaforge/miniforge3:latest - -# Create arguments for the paths. -ARG ASV_PATH="/app/asv" -ARG CODE_PATH="/app/code" - -# Install packages in Ubuntu. -ARG DEBIAN_FRONTEND=noninteractive -ENV TZ=America/Mexico_City -RUN apt-get --yes update && apt-get --yes install nginx git-lfs - -# Redirect the html path to our web page generated by ASV. -RUN rm --force --recursive /var/www/html; \ - ln --symbolic "${CODE_PATH}/.asv/html" /var/www - -# Clone the GitHub repositories which contains data. -WORKDIR /app -RUN git clone https://github.com/tardis-sn/tardis-refdata.git -RUN git clone https://github.com/tardis-sn/tardis-regression-data.git -WORKDIR /app/tardis-refdata -RUN git lfs ls-files --size -RUN git lfs pull - -# Create user and group. -# This user should be the same as the owner of the files in this directory (`tardis`). -ARG UID -ARG GID -ARG USER_NAME -ARG GROUP_NAME -RUN groupadd --gid "${GID}" --non-unique "${GROUP_NAME}" -RUN useradd --uid "${UID}" --non-unique --gid "${GID}" --create-home --shell /bin/bash "${USER_NAME}" - -# Create mamba environment. -ARG MAMBA_ENV_NAME="benchmark" -RUN mamba create --yes --name "${MAMBA_ENV_NAME}" python asv mamba -RUN mamba init -RUN echo "conda deactivate; mamba activate ${MAMBA_ENV_NAME}" >> "${HOME}/.bashrc"; - -# Create TARDIS environment in Conda with Mamba. -WORKDIR "${ASV_PATH}" -ARG CONDA_ENV_NAME="tardis" -COPY --chown="${UID}:${GID}" conda-linux-64.lock ./ -RUN mamba create --yes --name "${CONDA_ENV_NAME}" --file conda-linux-64.lock - -# Copy the basic files to set up ASV. -COPY --chown="${UID}:${GID}" tardis_env3.yml asv.conf.json ./ -RUN sed -i 's|"repo": "."|"repo": "'"${CODE_PATH}"'"|' asv.conf.json -RUN sed -i 's|.asv/env|'"${ASV_PATH}"'/env|' asv.conf.json -RUN sed -i 's|.asv/results|'"${CODE_PATH}"'/.asv/results|' asv.conf.json -RUN sed -i 's|.asv/html|'"${CODE_PATH}"'/.asv/html|' asv.conf.json -RUN sed -i 's|"benchmark_dir": "benchmarks"|"benchmark_dir": "'"${CODE_PATH}"'/benchmarks"|' asv.conf.json - -# Set up the ASV. -RUN . "${HOME}/.bashrc" \ - && asv machine --yes \ - && asv setup || true - -# Run the benchmarks and publish (generate the results and web page). -RUN --mount=type=bind,source=.,target="${CODE_PATH}",rw \ - . "${HOME}/.bashrc" \ - && asv run \ - && asv publish - -# The path /app/code is a live reference to our host TARDIS project. -# Git needs to trust this path. -WORKDIR "${CODE_PATH}" -RUN git config --global --add safe.directory "${CODE_PATH}" - -# Run the unit tests. -RUN --mount=type=bind,source=.,target="${CODE_PATH}",rw \ - . "${HOME}/.bashrc" \ - && mamba deactivate \ - && mamba activate "${CONDA_ENV_NAME}" \ - && python setup.py develop \ - && pytest tardis || true - -# Set up the user environment. -USER "${UID}:${GID}" -RUN mamba init -RUN echo "conda deactivate; mamba activate ${MAMBA_ENV_NAME}" >> "${HOME}/.bashrc"; -USER root -RUN chown "${UID}:${GID}" /app -RUN chown -R "${UID}:${GID}" "${ASV_PATH}" -RUN chown -R "${UID}:${GID}" /app/tardis-refdata -RUN chown -R "${UID}:${GID}" /app/tardis-regression-data - -# Change permissions to modify the Python packages for debug propouses. -RUN chown -R "${UID}:${GID}" "/opt/conda/envs/${MAMBA_ENV_NAME}/lib/python3.12/site-packages" - -# Return to the ASV path. -WORKDIR "${ASV_PATH}" - -# Execute the Nginx web service. -EXPOSE 80/tcp -CMD ["-g", "daemon off;"] -ENTRYPOINT ["/usr/sbin/nginx"] diff --git a/Dockerfile-benchmarks-live b/Dockerfile-benchmarks-live deleted file mode 100644 index 8f150388a1e..00000000000 --- a/Dockerfile-benchmarks-live +++ /dev/null @@ -1,49 +0,0 @@ -FROM condaforge/miniforge3:latest - -# Create arguments for the paths. -ARG CODE_PATH="/app/code" - -# Install packages in Ubuntu. -ARG DEBIAN_FRONTEND=noninteractive -ENV TZ=America/Mexico_City -RUN apt-get --yes update && apt-get --yes install nginx git-lfs - -# Redirect the html path to our web page generated by ASV. -RUN rm --force --recursive /var/www/html; \ - ln --symbolic "${CODE_PATH}/.asv/html" /var/www - -# Clone the GitHub repositories which contains data. -WORKDIR /app -RUN git clone https://github.com/tardis-sn/tardis-refdata.git -RUN git clone https://github.com/tardis-sn/tardis-regression-data.git -WORKDIR /app/tardis-refdata -RUN git lfs ls-files --size -RUN git lfs pull - -# Create user and group. -# This user should be the same as the owner of the files in this directory (`tardis`). -ARG UID -ARG GID -ARG USER_NAME -ARG GROUP_NAME -RUN groupadd --gid "${GID}" --non-unique "${GROUP_NAME}" -RUN useradd --uid "${UID}" --non-unique --gid "${GID}" --create-home --shell /bin/bash "${USER_NAME}" - -## Set up mamba. -USER "${UID}:${GID}" -ARG MAMBA_ENV_NAME="benchmark" -RUN mamba create --yes --name "${MAMBA_ENV_NAME}" python asv mamba -RUN mamba init -RUN echo "conda deactivate; mamba activate ${MAMBA_ENV_NAME}" >> "${HOME}/.bashrc"; - -# Create TARDIS environment in Conda with Mamba. -WORKDIR "${CODE_PATH}" -ARG CONDA_ENV_NAME="tardis" -COPY --chown="${UID}:${GID}" conda-linux-64.lock ./ -RUN mamba create --yes --name "${CONDA_ENV_NAME}" --file conda-linux-64.lock - -# Execute the Nginx web service. -EXPOSE 80/tcp -USER root -CMD ["-g", "daemon off;"] -ENTRYPOINT ["/usr/sbin/nginx"] diff --git a/Dockerfile-benchmarks-live.bash b/Dockerfile-benchmarks-live.bash deleted file mode 100755 index 17793589d5c..00000000000 --- a/Dockerfile-benchmarks-live.bash +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -set -xv - -# NOTE: If the `pkgs` and `.asv/env` folders exists. It doesn't need to be deleted except, -# if you want to run `asv setup` to recreate the ASV environment. -time rm --force --recursive pkgs .asv/env -time asv setup - -time asv machine --yes - -rm --force --recursive .asv/results -time asv run - -rm --force --recursive .asv/html -time asv publish - -#mamba deactivate -#mamba activate tardis -#python setup.py develop -#pytest tardis || true - -#mamba deactivate -#mamba activate benchmark diff --git a/Dockerfile-benchmarks-live.yaml b/Dockerfile-benchmarks-live.yaml deleted file mode 100644 index a96b381bb7e..00000000000 --- a/Dockerfile-benchmarks-live.yaml +++ /dev/null @@ -1,20 +0,0 @@ -version: "3.8" -services: - tardis-benchmarks-live: - image: tardis-benchmarks-live-image - container_name: tardis-benchmarks-live-container - hostname: dev-abc123 - build: - context: . - dockerfile: Dockerfile-benchmarks-live - args: - USER_NAME: "host-user" - UID: "1000" - GROUP_NAME: "host-group" - GID: "984" - volumes: - - type: bind - source: ./ - target: /app/code - ports: - - "8087:80" diff --git a/Dockerfile-benchmarks-static b/Dockerfile-benchmarks-static deleted file mode 100644 index fc4e69ef7dc..00000000000 --- a/Dockerfile-benchmarks-static +++ /dev/null @@ -1,63 +0,0 @@ -FROM condaforge/miniforge3:latest - -# Create arguments for the paths. -ARG CODE_PATH="/app/code" - -# Install packages in Ubuntu. -ARG DEBIAN_FRONTEND=noninteractive -ENV TZ=America/Mexico_City -RUN apt-get --yes update && apt-get --yes install nginx git-lfs - -# Redirect the html path to our web page generated by ASV. -RUN rm --force --recursive /var/www/html; \ - ln --symbolic "${CODE_PATH}/.asv/html" /var/www - -# Clone the GitHub repositories which contains data. -WORKDIR /app -RUN git clone https://github.com/tardis-sn/tardis-refdata.git -RUN git clone https://github.com/tardis-sn/tardis-regression-data.git -WORKDIR /app/tardis-refdata -RUN git lfs ls-files --size -RUN git lfs pull - -# Set up mamba. -ARG MAMBA_ENV_NAME="benchmark" -RUN mamba create --yes --name "${MAMBA_ENV_NAME}" python asv mamba -RUN mamba init -RUN echo "conda deactivate; mamba activate ${MAMBA_ENV_NAME}" >> "${HOME}/.bashrc"; - -# Copy the basic files to set up Conda. -WORKDIR "${CODE_PATH}" -COPY conda-linux-64.lock ./ - -# Create TARDIS environment in Conda with Mamba. -ARG CONDA_ENV_NAME="tardis" -RUN mamba create --yes --name "${CONDA_ENV_NAME}" --file conda-linux-64.lock - -# Copy the basic files to set up ASV. -COPY tardis_env3.yml asv.conf.json ./ - -# Set up the ASV. -RUN . "${HOME}/.bashrc" \ - && asv machine --yes \ - && asv setup || true - -# Copy the whole TARDIS project in the Docker image. -COPY . . - -# Run the unit tests. -RUN . "${HOME}/.bashrc" \ - && mamba deactivate \ - && mamba activate "${CONDA_ENV_NAME}" \ - && python setup.py develop \ - && pytest tardis || true - -# Run the benchmarks and publish (generate the results and web page). -RUN . "${HOME}/.bashrc" \ - && asv run \ - && asv publish - -# Execute the Nginx web service. -EXPOSE 80/tcp -CMD ["-g", "daemon off;"] -ENTRYPOINT ["/usr/sbin/nginx"] diff --git a/Dockerfile-benchmarks.bash b/Dockerfile-benchmarks.bash deleted file mode 100755 index 1cdbb6e7ecd..00000000000 --- a/Dockerfile-benchmarks.bash +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -docker container prune --force -docker container ls --all - -docker volume prune --force -docker volume ls - -docker image prune --force -docker image ls --all - -#docker builder prune --force -#docker system prune --force - -# Run this for the Dockerfile-benchmarks-static. -#DOCKER_FILE="Dockerfile-benchmarks-static" -#DOCKER_NAME="tardis-benchmarks-static" -#docker container stop "${DOCKER_NAME}-container" -#docker container kill "${DOCKER_NAME}-container" -#docker image rm "${DOCKER_NAME}-image" -#docker buildx build -t "${DOCKER_NAME}-image" -f "${DOCKER_FILE}" --progress plain . -##docker buildx build -t "${DOCKER_NAME}-image" -f "${DOCKER_FILE}" --no-cache --progress plain . -#docker container rm --force "${DOCKER_NAME}-container" 2> /dev/null -#docker run -it -p 8085:80 --name "${DOCKER_NAME}-container" -d "${DOCKER_NAME}-image" -#docker exec -it "${DOCKER_NAME}-container" bash -##docker exec -it --user root "${DOCKER_NAME}-container" bash - -# Run this for the Dockerfile-benchmarks-fragmented. -DOCKER_FILE="Dockerfile-benchmarks-fragmented" -DOCKER_NAME="tardis-benchmarks-fragmented" -docker container stop "${DOCKER_NAME}-container" -docker container kill "${DOCKER_NAME}-container" -docker image rm "${DOCKER_NAME}-image" -#docker buildx build -t "${DOCKER_NAME}-image" -f "${DOCKER_FILE}" --build-arg USER_NAME="host-user" --build-arg UID="$(id -u)" --build-arg GROUP_NAME="host-group" --build-arg GID="$(id -g)" . -docker buildx build -t "${DOCKER_NAME}-image" -f "${DOCKER_FILE}" --build-arg USER_NAME="host-user" --build-arg UID="$(id -u)" --build-arg GROUP_NAME="host-group" --build-arg GID="$(id -g)" --progress plain . -#docker buildx build -t "${DOCKER_NAME}-image" -f "${DOCKER_FILE}" --build-arg USER_NAME="host-user" --build-arg UID="$(id -u)" --build-arg GROUP_NAME="host-group" --build-arg GID="$(id -g)" --no-cache --progress plain . -docker container rm --force "${DOCKER_NAME}-container" 2> /dev/null -docker run -it -p 8086:80 --name "${DOCKER_NAME}-container" -v ./:/app/code -d "${DOCKER_NAME}-image" -docker exec -it --user "$(id -u):$(id -g)" "${DOCKER_NAME}-container" bash -#docker exec -it --user root "${DOCKER_NAME}-container" bash - -# Run this for the Dockerfile-benchmarks-live. -#DOCKER_FILE="Dockerfile-benchmarks-live" -#DOCKER_NAME="tardis-benchmarks-live" -#docker container stop "${DOCKER_NAME}-container" -#docker container kill "${DOCKER_NAME}-container" -#docker image rm "${DOCKER_NAME}-image" -#docker compose --file "${DOCKER_FILE}.yaml" down -#docker image rm "${DOCKER_NAME}-image" -##docker compose --file "${DOCKER_FILE}.yaml" --progress plain up -#docker compose --file "${DOCKER_FILE}.yaml" --progress plain up --detach -#docker exec -it --user "$(id -u):$(id -g)" "${DOCKER_NAME}-container" bash -##docker exec -it --user root "${DOCKER_NAME}-container" bash -#docker compose --file "${DOCKER_FILE}.yaml" down