Commit e6115b09 authored by Zhang Xiaoli's avatar Zhang Xiaoli
Browse files

增加测光模块photmix

parent c8f56ea3
FROM 10.3.10.10:8113/csst/csst-msc-l1-mbi-photmix
USER root
COPY run.sh /app/bin/
RUN chmod +x /app/bin/run.sh
COPY --from=hub.cstcloud.cn/scalebox/base /usr/local/sbin /usr/local/sbin
RUN mkdir /work/
RUN chown -R csst:csst /work
RUN chown -R csst:csst /pipeline
WORKDIR /work/
USER csst
ENTRYPOINT ["goagent"]
IMAGE_NAME:=cnic/csst-msc-l1-mbi-photmix
IMAGE_PATH:=/nfsdata/tmp
build:
docker build --network=host -t $(IMAGE_NAME) .
dist:
#docker save $(IMAGE_NAME) | zstdmt | pv | ssh c0 'zstd -d | docker load'
docker save $(IMAGE_NAME) > $(IMAGE_PATH)/msc-l1-mbi-photmix.tar
push:
docker push $(IMAGE_NAME)
run:
docker run -it --entrypoint bash $(IMAGE_NAME)
down:
docker stop $(IMAGE_NAME)
#!/bin/bash
# obsid 10160000000 - 10160000136
arr=($(echo $1 | tr "-" " "))
obsid="${arr[0]}"
detector="${arr[1]}"
echo "obsid: "$obsid
echo "detector: "$detector
cd /pipeline/output/
python /pipeline/app/run.py $obsid $detector
exit_code=$?
echo "=====pipeline.log====" > /work/custom-out.txt
cat /pipeline/output/pipeline.log >> /work/custom-out.txt
echo "======module.log======" >> /work/custom-out.txt
cat /pipeline/output/module.log|tail -n 100 >> /work/custom-out.txt
timefile=/pipeline/output/timestamp.txt
if test -f "$timefile"; then
echo "$timefile exist"
mv /pipeline/output/timestamp.txt /work/timestamps.txt
fi
rm -rf /pipeline/input/* /pipeline/output/*
echo finish photmix.
exit $exit_code
CLUSTER=csst-nao
all: reset build
run:
# PGHOST=192.168.25.27 GRPC_SERVER=192.168.25.27 scalebox app create --env-file csu.env
PGPORT=9090 scalebox app create --env-file nao.env
reset:
cd ${HOME}/docker-scalebox/clusters/$(CLUSTER) && make && cd -
down:
make -C ${HOME}/docker-scalebox/clusters/$(CLUSTER) down
list:
make -C ${HOME}/docker-scalebox/clusters/$(CLUSTER) list
#!/bin/bash
POSTGRES_USER=scalebox
POSTGRES_HOST=localhost
POSTGRES_DB=scalebox
PGPORT=5432
job_id=$1
# obsid="test.txt"
obsid="/nfsdata/share/pipeline-inttest/run-batch-msc/msg-mbi-all.txt"
while IFS= read -r line
do
m="$line"
arr=($(echo $m | tr " " " "))
obsid="${arr[0]}"
detector="${arr[1]}"
msg=$obsid-$detector
echo $msg
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},'${msg}')"
done < $obsid
~
name: msc-l1-mbi-photmix.app.process
label: 多色成像测光流水线
comment: 主巡天多色成像测光流水线
cluster: csst-nao
parameters:
initial_status: RUNNING
jobs:
msc-l1-mbi-photmix:
label: 多色成像测光
base_image: cnic/csst-msc-l1-mbi-photmix
# schedule_mode: HEAD
variables:
# always_running: yes
# reserved_on_exit: yes
output_text_size: 100000
text_tranc_mode: TAIL
locale_mode: NONE
# grpc_server: 172.24.23.6:50051
parameters:
# start_message: 10160000068
key_group_regex: ^(.{6})(.{3})$
key_group_seq: 1,2
environments:
- CSST_DFS_API_MODE=${CSST_DFS_API_MODE}
- CSST_DFS_GATEWAY=${CSST_DFS_GATEWAY}
- CSST_DFS_APP_ID=${CSST_DFS_APP_ID}
- CSST_DFS_APP_TOKEN=${CSST_DFS_APP_TOKEN}
- CCDS_SERVER_URL=${CCDS_SERVER_URL}
paths:
- ${CSST_AUX_ROOT}:/pipeline/aux:ro
- ${CSST_DFS_ROOT}:/dfs_root:ro
- ${CCDS_ROOT}:/ccds_root:ro
- ${CSST_AST_TEMP}:/pipeline/temp:rw
# command: docker run -d --network=host %ENVS% %VOLUMES% %IMAGE%
hosts:
- h0:5
- c0:10
# - c1:1
# - c2:1
# DFS
CSST_DFS_GATEWAY=10.3.10.28:30880
CSST_DFS_API_MODE=cluster
CSST_DFS_APP_ID=test
CSST_DFS_APP_TOKEN=test
CSST_DFS_LOGS_DIR="."
# CCDS
CCDS_SERVER_URL=http://10.3.10.28:29000
CCDS_USER=USER
CCDS_PASS=PASS
# VOLUMES
CSST_DFS_ROOT=/nfsdata/share/dfs/dfs_root # /dfs_root:ro
CCDS_ROOT=/nfsdata/share/dfs/ccds_root # /ccds_root:ro
CSST_AUX_ROOT=/nfsdata/share/pipeline-inttest/aux # /pipeline/aux:ro
CSST_AST_TEMP=/nfsdata/share/pipeline-inttest/ast_temp # /pipeline/temp:rw
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