Commit 7bc38a05 authored by Zhang Xiaoli's avatar Zhang Xiaoli
Browse files

modify docker container define

parent dfd666a2
FROM csst/csst-ifs-l1-rss:latest FROM csst/csst-ifs-l1-rss:latest
LABEL maintainer="Xiaoli Zhang<zhangxiaoli@cnic.cn>" LABEL maintainer="Xiaoli Zhang<zhangxiaoli@cnic.cn>"
USER root
COPY run.sh /app/bin/ COPY run.sh /app/bin/
RUN chmod +x /app/bin/run.sh RUN chmod +x /app/bin/run.sh
COPY --from=hub.cstcloud.cn/scalebox/base:0.9 /usr/local/sbin /usr/local/sbin COPY --from=hub.cstcloud.cn/scalebox/base:0.9 /usr/local/sbin /usr/local/sbin
......
...@@ -8,6 +8,7 @@ PGPORT=5432 ...@@ -8,6 +8,7 @@ PGPORT=5432
job_id=$1 job_id=$1
#for m in {30100000001..30100000050}; do
for m in {30100000003..30100000050}; do for m in {30100000003..30100000050}; do
echo $m echo $m
docker exec -t database psql -U ${POSTGRES_USER} -h ${POSTGRES_HOST} -d ${POSTGRES_DB} -p ${PGPORT} \ docker exec -t database psql -U ${POSTGRES_USER} -h ${POSTGRES_HOST} -d ${POSTGRES_DB} -p ${PGPORT} \
......
...@@ -6,12 +6,12 @@ parameters: ...@@ -6,12 +6,12 @@ parameters:
jobs: jobs:
ifs-l1-rss: ifs-l1-rss:
base_image: cnic/csst-ifs-l1-rss base_image: cnic/csst-ifs-l1-rss
# schedule_mode: HEAD schedule_mode: HEAD
variables: variables:
output_text_size: 100000 output_text_size: 100000
text_tranc_mode: TAIL text_tranc_mode: TAIL
locale_mode: NONE locale_mode: NONE
# grpc_server: 172.24.23.6:50051 grpc_server: 172.24.23.6:50051
parameters: parameters:
# start_message: scalebox # start_message: scalebox
key_group_regex: ^(.{6})(.{3})$ key_group_regex: ^(.{6})(.{3})$
...@@ -20,10 +20,11 @@ jobs: ...@@ -20,10 +20,11 @@ jobs:
- ${AUX_DIR}:/L1Pipeline/aux - ${AUX_DIR}:/L1Pipeline/aux
- ${CRDS_DIR}:/L1Pipeline/crds - ${CRDS_DIR}:/L1Pipeline/crds
- ${DFS_ROOT}:/L1Pipeline/dfs - ${DFS_ROOT}:/L1Pipeline/dfs
- /sharewcl/shao/docker/csst_ifs_l1_rss/code:/L1Pipeline/workspace
# command: docker run -d --network=host %ENVS% %VOLUMES% {{IMAGE}} # command: docker run -d --network=host %ENVS% %VOLUMES% {{IMAGE}}
# sink_jobs: # sink_jobs:
hosts: # hosts:
# - h0:1 # - h0:1
- c0:2 # - c0:2
# - c1:2 # - c1:2
# - c2:2 # - c2:2
\ No newline at end of file
# AUX_DIR=/sharewcl/shao/L1Pipeline/aux # AUX_DIR=/sharewcl/shao/L1Pipeline/aux
# CRDS_DIR=/sharewcl/shao/L1Pipeline/crds # CRDS_DIR=/sharewcl/shao/L1Pipeline/crds
# DFS_ROOT=/sharewcl/shao/L1Pipeline/dfs # DFS_ROOT=/sharewcl/shao/L1Pipeline/dfs
AUX_DIR=/sharewcl/shao/L1Pipeline/aux
AUX_DIR=/share/shao/L1Pipeline/aux CRDS_DIR=/sharewcl/shao/L1Pipeline/crds
CRDS_DIR=/share/shao/L1Pipeline/crds DFS_ROOT=/sharewcl/dfs
DFS_ROOT=/share/dfs #AUX_DIR=/share/shao/L1Pipeline/aux
\ No newline at end of file #CRDS_DIR=/share/shao/L1Pipeline/crds
#DFS_ROOT=/share/dfs
FROM csst/csst-mci-l1:latest FROM csst/csst-mci-l1:latest
LABEL maintainer="Xiaoli Zhang<zhangxiaoli@cnic.cn>" LABEL maintainer="Xiaoli Zhang<zhangxiaoli@cnic.cn>"
COPY run.sh /app/bin/ COPY run.sh /app/bin/
......
IMAGE_NAME:=csst/mci-l1 IMAGE_NAME:=cnic/csst-mci-l1
build: build:
docker build --network=host -t $(IMAGE_NAME) . docker build --network=host -t $(IMAGE_NAME) .
......
#!/bin/bash #!/bin/bash
obsid="xxxxxxxxxxxx"
# python l1_pipeline_script_mci_shao_simdata.py $obsid > ./stdout
python /L1Pipeline/workspace/helloworld.py
exit_code=$? # obsid="30100000001"
\ No newline at end of file
obsid=$1
python /L1Pipeline/workspace/l1_pipeline_script_mci_shao_simdata.py $obsid
exit_code=$?
mkdir -p /work
# echo "=====csst-l1-ifs-rss.log====" > /work/user-file.txt
# cat /L1Pipeline/workspace/ifs/rss/proc_data/path_RSSlog.txt >> /work/user-file.txt
# rm -rf /L1Pipeline/L0/* /L1Pipeline/L1/*
# mv /tmp/timestamps.txt /work/timestamps.txt
echo finish mci pipeline.
exit $exit_code
#!/bin/bash
POSTGRES_USER=scalebox
POSTGRES_HOST=localhost
POSTGRES_DB=scalebox
PGPORT=5432
job_id=$1
#for m in {20100000001..20100000005}; do
for m in {20100000002..20100000005}; do
echo $m
docker exec -t database psql -U ${POSTGRES_USER} -h ${POSTGRES_HOST} -d ${POSTGRES_DB} -p ${PGPORT} \
-c "INSERT INTO t_task(job,key_message) VALUES(${job_id},'${m}')"
done
...@@ -5,7 +5,8 @@ parameters: ...@@ -5,7 +5,8 @@ parameters:
jobs: jobs:
mci-l1: mci-l1:
base_image: csst/mci-l1 base_image: cnic/csst-mci-l1
schedule_mode: HEAD
variables: variables:
output_text_size: 100000 output_text_size: 100000
text_tranc_mode: TAIL text_tranc_mode: TAIL
...@@ -13,6 +14,12 @@ jobs: ...@@ -13,6 +14,12 @@ jobs:
parameters: parameters:
key_group_regex: ^(.{6})(.{3})$ key_group_regex: ^(.{6})(.{3})$
key_group_seq: 1,2 key_group_seq: 1,2
start_message: 20100000001
paths:
- ${AUX_DIR}:/L1Pipeline/aux
- ${CRDS_DIR}:/L1Pipeline/crds
- ${DFS_ROOT}:/L1Pipeline/dfs
- /sharewcl/shao/docker/csst_mci_l1/code:/L1Pipeline/workspace
# paths: # paths:
# - ${AUX_DIR}:/L1Pipeline/aux # - ${AUX_DIR}:/L1Pipeline/aux
# - ${CRDS_DIR}:/L1Pipeline/aux/C6.1_ref_crds # - ${CRDS_DIR}:/L1Pipeline/aux/C6.1_ref_crds
...@@ -23,4 +30,4 @@ jobs: ...@@ -23,4 +30,4 @@ jobs:
# - h0:1 # - h0:1
# - c0:2 # - c0:2
# - c1:2 # - c1:2
# - c2:2 # - c2:2
\ No newline at end of file
AUX_DIR=/sharewcl/L1Pipeline/aux AUX_DIR=/sharewcl/shao/L1Pipeline/aux
CRDS_DIR=/sharewcl/OnOrbitCal/SimData/ref_202211/products_ref20_3hdr CRDS_DIR=/sharewcl/shao/L1Pipeline/crds
DFS_ROOT=/sharewcl/dfs DFS_ROOT=/sharewcl/dfs
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment