Skip to content

Commit ad75c36

Browse files
committed
update copyright and add test for nginx
Signed-off-by: zhihang <zhihangdeng@link.cuhk.edu.cn>
1 parent 873160f commit ad75c36

File tree

8 files changed

+21
-13
lines changed

8 files changed

+21
-13
lines changed

Dockerfile.openEuler

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2025 Intel Corporation
1+
# Copyright (C) 2025 Huawei Technologies Co., Ltd.
22
# SPDX-License-Identifier: Apache-2.0
33

44
# Base image for GenAIComps based OPEA Python applications

comps/dataprep/src/Dockerfile.openEuler

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2024 Intel Corporation
1+
# Copyright (C) 2025 Huawei Technologies Co., Ltd.
22
# SPDX-License-Identifier: Apache-2.0
33

44
FROM openeuler/python:3.11.13-oe2403lts

comps/embeddings/src/Dockerfile.openEuler

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2024 Intel Corporation
1+
# Copyright (C) 2025 Huawei Technologies Co., Ltd.
22
# SPDX-License-Identifier: Apache-2.0
33

44
FROM openeuler/python:3.11.13-oe2403lts

comps/guardrails/src/guardrails/Dockerfile.openEuler

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2024 Intel Corporation
1+
# Copyright (C) 2025 Huawei Technologies Co., Ltd.
22
# SPDX-License-Identifier: Apache-2.0
33

44
FROM openeuler/python:3.11.13-oe2403lts

comps/rerankings/src/Dockerfile.openEuler

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2024 Intel Corporation
1+
# Copyright (C) 2025 Huawei Technologies Co., Ltd.
22
# SPDX-License-Identifier: Apache-2.0
33

44
FROM openeuler/python:3.11.13-oe2403lts

comps/retrievers/src/Dockerfile.openEuler

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2024 Intel Corporation
1+
# Copyright (C) 2025 Huawei Technologies Co., Ltd.
22
# SPDX-License-Identifier: Apache-2.0
33

44
FROM openeuler/python:3.11.13-oe2403lts

comps/third_parties/nginx/src/Dockerfile.openEuler

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2024 Intel Corporation
1+
# Copyright (C) 2025 Huawei Technologies Co., Ltd.
22
# SPDX-License-Identifier: Apache-2.0
33

44

tests/third_parties/test_third_parties_nginx.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ ip_address=$(hostname -I | awk '{print $1}')
1010

1111
function build_docker_images() {
1212
cd $WORKPATH
13-
docker build --no-cache --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -t opea/nginx:comps -f comps/third_parties/nginx/src/Dockerfile .
13+
dockerfile_name="comps/third_parties/nginx/src/$1"
14+
docker build --no-cache --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -t opea/nginx:comps -f "${dockerfile_name}" .
1415
if [ $? -ne 0 ]; then
1516
echo "opea/nginx built fail"
1617
exit 1
@@ -57,21 +58,28 @@ function validate_service() {
5758
fi
5859
}
5960

60-
function stop_docker() {
61+
function stop_service() {
6162
cid=$(docker ps -aq --filter "name=test-comps-nginx*")
6263
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
6364
}
6465

6566
function main() {
67+
68+
build_docker_images "Dockerfile"
69+
trap stop_service EXIT
6670

67-
stop_docker
68-
build_docker_images
71+
echo "Test normal env ..."
6972
start_service
70-
7173
validate_service
74+
stop_service
7275

73-
echo y | docker system prune
76+
echo "Test with openEuler OS ..."
77+
build_docker_images "Dockerfile.openEuler"
78+
start_service
79+
validate_service
80+
stop_service
7481

82+
docker system prune -f
7583
}
7684

7785
main

0 commit comments

Comments
 (0)