Skip to content

Commit

Permalink
Add transfer stats to sync
Browse files Browse the repository at this point in the history
  • Loading branch information
robballantyne committed Nov 1, 2023
1 parent 0e9aa88 commit 6d72ab1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build/COPY_ROOT/opt/ai-dock/bin/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ init_serverless() {
touch /run/workspace_sync
init_source_config_script
init_write_environment
init_sync_mamba_envs >> /var/log/sync.log 2>&1
init_sync_opt >> /var/log/sync.log 2>&1
init_sync_mamba_envs > /var/log/sync.log | awk '{$1=$1};1' 2>&1
init_sync_opt > /var/log/sync.log | awk '{$1=$1};1' 2>&1
rm /run/workspace_sync
init_source_preflight_script > /var/log/preflight.log 2>&1
rm /run/container_config
Expand Down Expand Up @@ -194,7 +194,7 @@ function init_sync_mamba_envs() {
if [[ ${SERVERLESS,,} != 'true' ]]; then
printf "Moving mamba environments to ${WORKSPACE}...\n"
rm -rf ${WORKSPACE}micromamba
rsync -az --info=progress2 /opt/micromamba "${WORKSPACE}" >> /var/log/sync.log 2>&1 && \
rsync -az --info=progress2 --stats /opt/micromamba "${WORKSPACE}" && \
rm -rf /opt/micromamba/* && \
printf 1 > ${WORKSPACE}micromamba/.move_complete && \
link-mamba-envs.sh
Expand Down Expand Up @@ -243,7 +243,7 @@ init_sync_opt() {
# Complete the copy if not serverless
if [[ ${SERVERLESS,,} != 'true' ]]; then
printf "Moving %s to %s\n" $opt_dir $ws_dir
rsync -az --info=progress2 "$opt_dir" "$WORKSPACE" >> /var/log/sync.log 2>&1 && \
rsync -az --info=progress2 --stats "$opt_dir" "$WORKSPACE" && \
printf 1 > $ws_dir/.move_complete && \
rm -rf "$opt_dir"
fi
Expand Down

0 comments on commit 6d72ab1

Please sign in to comment.