Merge pull request #1 from LBRYFoundation/Update-Snapshot-to-zstd

Update snapshot to zstd
This commit is contained in:
Ralph 2024-01-03 09:59:58 -05:00 committed by GitHub
commit 0cbd81c676
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -20,7 +20,8 @@ RUN apt-get update && \
python3.9 \
python3.9-dev \
python3-cffi \
python3-pip && \
python3-pip
zstd && \
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
rm -rf /var/lib/apt/lists/*

View file

@ -9,7 +9,8 @@ SNAPSHOT_URL="${SNAPSHOT_URL:-}" #off by default. latest snapshot at https://lbr
if [[ "$HUB_COMMAND" == "scribe" ]] && [[ -n "$SNAPSHOT_URL" ]] && [[ ! -d /database/lbry-rocksdb ]]; then
files="$(ls)"
echo "Downloading and extracting hub snapshot from $SNAPSHOT_URL"
wget --no-verbose -c "$SNAPSHOT_URL" -O - | tar --use-compress-program=unzstd x -C /database
#wget --no-verbose -c "$SNAPSHOT_URL" -O - | tar x -C /database
curl "$SNAPSHOT_URL" | zstd -d | tar xf - -C /database
fi
if [ -z "$HUB_COMMAND" ]; then