chess-tutor / docker /stage-web-data.sh
github-actions[bot]
deploy prod from 06dbd16a01ddcfe02b2d936c681e3e4eaa9b141f
8e756fd
Raw
History Blame Contribute Delete
899 Bytes
#!/bin/sh
# Lay out minimal runtime trees under /app (see Dockerfile header for paths).
set -eu
STAGE="${1:?staging dir}"
APP="${2:?app root}"
mkdir -p "${APP}/docs" \
"${APP}/data/models/cohort/standard_600" \
"${APP}/data/inference" \
"${APP}/data/web_artifacts/cohort/standard_600"
cp "${STAGE}/catalog/"*.yaml "${APP}/docs/"
cp "${STAGE}/models/"*.joblib "${APP}/data/models/cohort/standard_600/"
cp "${STAGE}/inference/chesscom_lichess_rapid_linear.joblib" "${APP}/data/inference/"
cp "${STAGE}/web_artifacts/"* "${APP}/data/web_artifacts/cohort/standard_600/"
if [ -d "${STAGE}/lichess-puzzles/data" ]; then
for f in "${STAGE}/lichess-puzzles/data"/train-*.parquet; do
if [ -f "$f" ]; then
mkdir -p "${APP}/data/lichess-puzzles/data"
cp "${STAGE}/lichess-puzzles/data/"*.parquet "${APP}/data/lichess-puzzles/data/"
break
fi
done
fi