Skip to content

Commit 81471c8

Browse files
committed
Support for openEuler
Signed-off-by: zhihang <[email protected]>
1 parent a216a1c commit 81471c8

File tree

5 files changed

+60
-2
lines changed

5 files changed

+60
-2
lines changed

ChatQnA/Dockerfile.openeuler

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (C) 2024 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
ARG IMAGE_REPO=openeuler
5+
ARG BASE_TAG=latest
6+
FROM $IMAGE_REPO/comps-base:$BASE_TAG
7+
8+
COPY ./chatqna.py $HOME/chatqna.py
9+
COPY ./entrypoint.sh $HOME/entrypoint.sh
10+
11+
ENTRYPOINT ["bash", "entrypoint.sh"]

ChatQnA/docker_compose/intel/cpu/xeon/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,4 @@ services:
180180

181181
networks:
182182
default:
183-
driver: bridge
183+
driver: bridge

ChatQnA/docker_compose/intel/cpu/xeon/set_env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ export FAQGen_COMPONENT_NAME="OpeaFaqGenvLLM"
3434
export LLM_ENDPOINT="http://${host_ip}:${LLM_ENDPOINT_PORT}"
3535
pushd "grafana/dashboards" > /dev/null
3636
source download_opea_dashboard.sh
37-
popd > /dev/null
37+
popd > /dev/null
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (C) 2024 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Use node 20.11.1 as the base image
5+
FROM openeuler/node:latest
6+
7+
# Update package manager and install Git
8+
RUN yum update -y && yum install -y git
9+
10+
# Copy the front-end code repository
11+
COPY svelte /home/user/svelte
12+
13+
# Set the working directory
14+
WORKDIR /home/user/svelte
15+
16+
# Install front-end dependencies
17+
RUN npm install
18+
19+
# Build the front-end application
20+
RUN npm run build
21+
22+
# Expose the port of the front-end application
23+
EXPOSE 5173
24+
25+
# Run the front-end application in preview mode
26+
CMD ["npm", "run", "preview", "--", "--port", "5173", "--host", "0.0.0.0"]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (C) 2024 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Use node 20.11.1 as the base image
5+
FROM openeuler/node:latest as vite-app
6+
7+
COPY react /usr/app/react
8+
WORKDIR /usr/app/react
9+
10+
11+
RUN ["npm", "install"]
12+
RUN ["npm", "run", "build"]
13+
14+
15+
FROM openeuler/nginx:latest
16+
17+
COPY --from=vite-app /usr/app/react/dist /usr/share/nginx/html
18+
COPY ./react/env.sh /docker-entrypoint.d/env.sh
19+
20+
COPY ./react/nginx.conf /etc/nginx/conf.d/default.conf
21+
RUN chmod +x /docker-entrypoint.d/env.sh

0 commit comments

Comments
 (0)