From bfde7843d310357f16a4e58226cb828de19f067c Mon Sep 17 00:00:00 2001 From: rustam810 Date: Wed, 26 Feb 2025 11:10:48 +0100 Subject: [PATCH] change gpu base image --- Makefile | 2 +- ...kerfile.pretrained_embeddings_spacy_ru_gpu | 58 ------------------- docker/docker-bake.hcl | 2 +- pyproject.toml | 2 +- version | 2 +- 5 files changed, 4 insertions(+), 62 deletions(-) delete mode 100644 docker/Dockerfile.pretrained_embeddings_spacy_ru_gpu diff --git a/Makefile b/Makefile index be92ebd62d6e..9b4f88171f39 100644 --- a/Makefile +++ b/Makefile @@ -295,7 +295,7 @@ build-docker-sbert-l: build-docker-spacy-ru-gpu: export IMAGE_NAME=rasa && \ - export BASE_IMAGE=nvidia/cuda:11.2.2-devel-ubuntu20.04 && \ + export BASE_IMAGE=nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 && \ docker buildx use default && \ docker buildx bake -f docker/docker-bake.hcl base && \ docker buildx bake -f docker/docker-bake.hcl base-poetry && \ diff --git a/docker/Dockerfile.pretrained_embeddings_spacy_ru_gpu b/docker/Dockerfile.pretrained_embeddings_spacy_ru_gpu deleted file mode 100644 index d3032571d33d..000000000000 --- a/docker/Dockerfile.pretrained_embeddings_spacy_ru_gpu +++ /dev/null @@ -1,58 +0,0 @@ -# The image tagged with the 'spacy-it' suffix -ARG IMAGE_BASE_NAME -ARG BASE_IMAGE_HASH -ARG BASE_BUILDER_IMAGE_HASH - -FROM ${IMAGE_BASE_NAME}:base-builder-${BASE_BUILDER_IMAGE_HASH} as builder - -# copy files -COPY . /build/ -COPY docker/configs/config_pretrained_embeddings_spacy_ru.yml /build/config.yml - -# change working directory -WORKDIR /build - -# install dependencies -RUN python -m venv /opt/venv && \ - . /opt/venv/bin/activate && pip install --no-cache-dir -U "pip==22.*" -U "wheel>0.38.0" -U "tensorrt==8.6.1" -RUN . /opt/venv/bin/activate && poetry install --extras spacy --no-dev --no-root --no-interaction -RUN . /opt/venv/bin/activate && poetry build -f wheel -n && \ - pip install --no-deps dist/*.whl && \ - rm -rf dist *.egg-info - -# make sure we use the virtualenv -ENV PATH="/opt/venv/bin:$PATH" - -RUN python -m spacy download ru_core_news_md - -# start a new build stage -FROM ${IMAGE_BASE_NAME}:base-${BASE_IMAGE_HASH} as runner - -# copy everything from /opt -COPY --from=builder /opt/venv /opt/venv - -# make sure we use the virtualenv -ENV PATH="/opt/venv/bin:$PATH" -ENV LD_LIBRARY_PATH="/opt/venv/lib64/python3.8/site-packages/tensorrt_libs:/opt/venv/lib64/python3.8/site-packages/nvidia/cudnn/lib:$LD_LIBRARY_PATH" - -RUN ln -s /opt/venv/lib64/python3.8/site-packages/tensorrt_libs/libnvinfer_plugin.so.8 /opt/venv/lib64/python3.8/site-packages/tensorrt_libs/libnvinfer_plugin.so.7 -RUN ln -s /opt/venv/lib64/python3.8/site-packages/tensorrt_libs/libnvinfer.so.8 /opt/venv/lib64/python3.8/site-packages/tensorrt_libs/libnvinfer.so.7 - -# set HOME environment variable -ENV HOME=/app - -# update permissions & change user to not run as root -WORKDIR /app -RUN chgrp -R 0 /app && chmod -R g=u /app && chmod o+wr /app -USER 1001 - -# Create a volume for temporary data -VOLUME /tmp - -# change shell -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -# the entry point -EXPOSE 5005 -ENTRYPOINT ["rasa"] -CMD ["--help"] diff --git a/docker/docker-bake.hcl b/docker/docker-bake.hcl index 734649100e8e..f2c7318aa8f3 100644 --- a/docker/docker-bake.hcl +++ b/docker/docker-bake.hcl @@ -233,7 +233,7 @@ target "spacy-ru" { } target "spacy-ru-gpu" { - dockerfile = "docker/Dockerfile.pretrained_embeddings_spacy_ru_gpu" + dockerfile = "docker/Dockerfile.pretrained_embeddings_spacy_ru" tags = ["${IMAGE_NAME}:${IMAGE_TAG}-spacy-ru-gpu"] args = { diff --git a/pyproject.toml b/pyproject.toml index d728d36caa4e..b213ba4cc0d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,7 +111,7 @@ colorhash = ">=1.0.2,<1.3.0" jsonschema = ">=3.2,<4.18" packaging = ">=20.0,<21.0" pytz = ">=2019.1,<2023.0" -rasa-sdk = {git = "https://github.com/epoch8/rasa-sdk.git", rev = "5099d6b"} +rasa-sdk = {git = "https://github.com/epoch8/rasa-sdk.git", rev = "3.6.1-e8-0.2.0"} colorclass = "~2.2" terminaltables = "~3.1.0" sanic = "~21.12" diff --git a/version b/version index 79b77041d4d3..efe385a957a0 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.6.5-e8-0.4.1 \ No newline at end of file +3.6.5-e8-0.4.2 \ No newline at end of file