diff --git a/translation-ui/1.0/24.03-lts/Dockerfile b/translation-ui/1.0/24.03-lts/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c41e508624431361c33f7f61bdacf15f4507c1a9 --- /dev/null +++ b/translation-ui/1.0/24.03-lts/Dockerfile @@ -0,0 +1,32 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +# Use node 20.11.1 as the base image +FROM openeuler/openeuler:24.03-lts + +# Update package manager and install Git +RUN yum update -y && \ + yum install -y \ + --setopt=install_weak_deps=False \ + npm \ + git + +WORKDIR /home/user/ + +# Copy the front-end code repository +RUN git clone https://github.com/opea-project/GenAIExamples.git && cd GenAIExamples && git checkout v1.0 + +# Set the working directory +WORKDIR /home/user/GenAIExamples/Translation/ui/svelte + +# Install front-end dependencies +RUN npm install + +# Build the front-end application +RUN npm run build + +# Expose the port of the front-end application +EXPOSE 5173 + +# Run the front-end application in preview mode +CMD ["npm", "run", "preview", "--", "--port", "5173", "--host", "0.0.0.0"] diff --git a/translation-ui/meta.yml b/translation-ui/meta.yml new file mode 100644 index 0000000000000000000000000000000000000000..fded9031d45911c5b56393affeecec348d0957f4 --- /dev/null +++ b/translation-ui/meta.yml @@ -0,0 +1,3 @@ +1.0-oe2403lts: + path: translation-ui/1.0/24.03-lts/Dockerfile + arch: x86_64 \ No newline at end of file diff --git a/translation/1.0/24.03-lts/Dockerfile b/translation/1.0/24.03-lts/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..493eb7bb96f27d8fb1b3e13c5202f55525d8edaf --- /dev/null +++ b/translation/1.0/24.03-lts/Dockerfile @@ -0,0 +1,47 @@ +# Copyright (c) 2024 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +FROM openeuler/openeuler:24.03-lts + +RUN yum update -y && \ + yum install -y \ + --setopt=install_weak_deps=False \ + python-pip python \ + shadow-utils \ + mesa-libGL \ + jemalloc-devel \ + git + +RUN useradd -m -s /bin/bash user && \ + mkdir -p /home/user && \ + chown -R user /home/user/ + +USER user + +WORKDIR /home/user/ +RUN git clone https://github.com/opea-project/GenAIComps.git && cd GenAIComps && git checkout v1.0 + +WORKDIR /home/user/GenAIComps +RUN pip install --no-cache-dir --upgrade pip && \ + pip install --no-cache-dir -r /home/user/GenAIComps/requirements.txt + +WORKDIR /home/user/ +RUN git clone https://github.com/opea-project/GenAIExamples.git && cd GenAIExamples && git checkout v1.0 +RUN cp GenAIExamples/Translation/translation.py . +RUN rm -rf GenAIExamples + +ENV PYTHONPATH=$PYTHONPATH:/home/user/GenAIComps + +ENTRYPOINT ["python", "translation.py"] diff --git a/translation/meta.yml b/translation/meta.yml new file mode 100644 index 0000000000000000000000000000000000000000..ec4a3517e7999d7eec2db21995b7d2774fc134d2 --- /dev/null +++ b/translation/meta.yml @@ -0,0 +1,3 @@ +1.0-oe2403lts: + path: translation/1.0/24.03-lts/Dockerfile + arch: x86_64 \ No newline at end of file