diff --git a/Dockerfile.arm b/Dockerfile.arm new file mode 100644 index 0000000..bf625ae --- /dev/null +++ b/Dockerfile.arm @@ -0,0 +1,17 @@ +FROM 172.20.32.187/pipeline-service/aimstack/aim:3.19.0-build-env + +ARG http_proxy +ARG https_proxy + +ENV http_proxy=${http_proxy} +ENV https_proxy=${https_proxy} +WORKDIR /app + +RUN pip install httpx aim==3.19.0 -i https://pypi.tuna.tsinghua.edu.cn/simple + +ENV http_proxy="" +ENV https_proxy="" + +COPY aim_proxy.py /app/server.py + +ENTRYPOINT ["python", "server.py"] diff --git a/aim_proxy.py b/aim_proxy.py index 1c16cdb..2525903 100644 --- a/aim_proxy.py +++ b/aim_proxy.py @@ -45,11 +45,11 @@ def is_running_in_kubernetes(): if is_running_in_kubernetes(): print("Running in Kubernetes environment") - repo_path = 'aim://my-aim-server-service.aim:53800' - host = 'http://my-aim-ui-service.aim:43800' + repo_path = 'aim://aim-server-service.aim:53800' + host = 'http://aim-ui-service.aim:43800' else: - repo_path = 'aim://172.20.32.181:30058' - host = 'http://172.20.32.181:30059' + repo_path = 'aim://172.20.32.197:30058' + host = 'http://172.20.32.197:30059' print("Not running in Kubernetes environment") api_url = f'{host}/api/runs/search/run/' diff --git a/arm-build-images.sh b/arm-build-images.sh new file mode 100755 index 0000000..f688376 --- /dev/null +++ b/arm-build-images.sh @@ -0,0 +1,6 @@ +#!/bin/bash +#日期精确到分钟 +image=172.20.32.187/pipeline-service/aim-porxy:$(date "+%Y%m%d%H%M%S")-arm +docker build --build-arg "http_proxy=http://172.20.32.253:3128" --build-arg "https_proxy=http://172.20.32.253:3128" -t $image -f Dockerfile.arm . + +docker push $image diff --git a/build-images.sh b/build-images.sh old mode 100644 new mode 100755 diff --git a/fetch.sh b/fetch.sh old mode 100644 new mode 100755