Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
csst
Scalebox Apps
Commits
227dbe2b
Commit
227dbe2b
authored
Jul 22, 2025
by
Zhang Xiaoli
Browse files
天测csst-msc-l1-ast-astrometry单元测试成功
parent
8472bf91
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
0 deletions
+95
-0
L1/dockerfiles/csst-msc-l1-ast/Dockerfile
L1/dockerfiles/csst-msc-l1-ast/Dockerfile
+15
-0
L1/dockerfiles/csst-msc-l1-ast/Makefile
L1/dockerfiles/csst-msc-l1-ast/Makefile
+20
-0
L1/dockerfiles/csst-msc-l1-ast/run.sh
L1/dockerfiles/csst-msc-l1-ast/run.sh
+60
-0
No files found.
L1/dockerfiles/csst-msc-l1-ast/Dockerfile
0 → 100644
View file @
227dbe2b
FROM
csu-harbor.csst.nao:10443/csst/csst-msc-l1-ast-astrometry
USER
root
COPY
run.sh /app/bin/
RUN
chmod
+x /app/bin/run.sh
COPY
--from=hub.cstcloud.cn/scalebox/agent /usr/local /usr/local
RUN
mkdir
/work/
RUN
chown
-R
csst:csst /work
RUN
chown
-R
csst:csst /pipeline
WORKDIR
/work/
USER
csst
ENTRYPOINT
["goagent"]
L1/dockerfiles/csst-msc-l1-ast/Makefile
0 → 100644
View file @
227dbe2b
IMAGE_NAME
:=
cnic/csst-msc-l1-ast-astrometry
IMAGE_PATH
:=
/nfs/tmp/scalebox-images
build
:
docker pull csu-harbor.csst.nao:10443/csst/csst-msc-l1-ast-astrometry
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-ast.tar
ssh
sc1
docker
load
-i
$(IMAGE_PATH)/msc-l1-ast.tar
ssh
sc2
docker
load
-i
$(IMAGE_PATH)/msc-l1-ast.tar
ssh
sc3
docker
load
-i
$(IMAGE_PATH)/msc-l1-ast.tar
push
:
docker push
$(IMAGE_NAME)
run
:
docker run
-it
--entrypoint
bash
$(IMAGE_NAME)
down
:
docker stop
$(IMAGE_NAME)
scp
:
scp
-r
./ csst-csu:/root/csst/csst-msc-l1-ast/
L1/dockerfiles/csst-msc-l1-ast/run.sh
0 → 100644
View file @
227dbe2b
#!/bin/bash
#TRACE=yes 临时办法
rm
-rf
/work/
*
message
=
$1
echo
"message: "
$message
cd
/pipeline/output/
python /pipeline/app/run.py
$message
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
headers
=
$2
pattern
=
'"dag_run_id":"([^"]+)"'
if
[[
$headers
=
~
$pattern
]]
;
then
dag_run_id
=
"
${
BASH_REMATCH
[1]
}
"
echo
"dag_run_id:
$dag_run_id
"
else
# no dag_run_id in json
dag_run_id
=
""
fi
echo
"dag_run_id:
$dag_run_id
"
>>
/work/extra-attributes.txt
pattern
=
'"sorted_tag":"([^"]+)"'
if
[[
$headers
=
~
$pattern
]]
;
then
sorted_tag
=
"
${
BASH_REMATCH
[1]
}
"
echo
"sorted_tag:
$sorted_tag
"
else
# no sorted_tag in json
sorted_tag
=
1
fi
if
[
$exit_code
-eq
0
]
;
then
echo
"finish ast, start sink-job."
scalebox task add
--header
sorted_tag
=
${
sorted_tag
}
--header
dag_run_id
=
${
dag_run_id
}
--header
repeatable
=
yes
--upsert
${
message
}
# scalebox task add $1
else
echo
"finish ast, exit_code:
$exit_code
"
fi
rm
-rf
/pipeline/input/
*
/pipeline/output/
*
exit
$exit_code
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment