• Joined on 2026-03-12

tradscan (6d581a7)

Published 2026-07-02 20:34:48 +02:00 by thymon

Installation

docker pull gitea.thymon.fr/thymon/tradscan:6d581a7
sha256:c4135364fa80f1c513e28861412eaeaf41e054f20fc58afd7a0f692a17e97546

Images

Digest OS / Arch Size
4a5b963804 linux/amd64 3.9 GiB

Image Layers ( linux/amd64)

# debian.sh --arch 'amd64' out/ 'bookworm' '@1782172800'
ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV LANG=C.UTF-8
RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends ca-certificates netbase tzdata ; rm -rf /var/lib/apt/lists/* # buildkit
ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305
ENV PYTHON_VERSION=3.12.13
ENV PYTHON_SHA256=c08bc65a81971c1dd5783182826503369466c7e67374d1646519adf05207b684
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends dpkg-dev gcc gnupg libbluetooth-dev libbz2-dev libc6-dev libdb-dev libffi-dev libgdbm-dev liblzma-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev make tk-dev uuid-dev wget xz-utils zlib1g-dev ; wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; echo "$PYTHON_SHA256 *python.tar.xz" | sha256sum -c -; wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; gpg --batch --verify python.tar.xz.asc python.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME" python.tar.xz.asc; mkdir -p /usr/src/python; tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; rm python.tar.xz; cd /usr/src/python; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; ./configure --build="$gnuArch" --enable-loadable-sqlite-extensions --enable-optimizations --enable-option-checking=fatal --enable-shared $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') --with-ensurepip ; nproc="$(nproc)"; EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; case "$arch" in amd64|arm64) EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; ;; i386) ;; *) EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; ;; esac; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-}" ; rm python; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" python ; make install; cd /; rm -rf /usr/src/python; find /usr/local -depth \( \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \) -exec rm -rf '{}' + ; ldconfig; apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark; find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' | sort -u | xargs -rt dpkg-query --search | awk 'sub(":$", "", $1) { print $1 }' | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; rm -rf /var/lib/apt/lists/*; export PYTHONDONTWRITEBYTECODE=1; python3 --version; pip3 --version # buildkit
RUN /bin/sh -c set -eux; for src in idle3 pip3 pydoc3 python3 python3-config; do dst="$(echo "$src" | tr -d 3)"; [ -s "/usr/local/bin/$src" ]; [ ! -e "/usr/local/bin/$dst" ]; ln -svT "$src" "/usr/local/bin/$dst"; done # buildkit
CMD ["python3"]
WORKDIR /app
ARG CLAUDE_CLI_VERSION=2.1.158
RUN |1 CLAUDE_CLI_VERSION=2.1.158 /bin/sh -c apt-get update && apt-get install -y --no-install-recommends tmux git gosu curl ca-certificates && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && apt-get install -y --no-install-recommends nodejs && npm install -g "@anthropic-ai/claude-code@${CLAUDE_CLI_VERSION}" && npm cache clean --force && apt-get purge -y curl && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* # buildkit
RUN |1 CLAUDE_CLI_VERSION=2.1.158 /bin/sh -c groupadd -r appgroup && useradd -r -g appgroup -m appuser # buildkit
COPY requirements.txt ./ # buildkit
RUN |1 CLAUDE_CLI_VERSION=2.1.158 /bin/sh -c pip install --no-cache-dir -r requirements.txt # buildkit
ARG EMBED_MODEL=sentence-transformers/LaBSE
ARG EMBED_REVISION=836121a0533e5664b21c7aacc5d22951f2b8b25b
ENV HF_HOME=/opt/hf-cache SENTENCE_TRANSFORMERS_HOME=/opt/hf-cache TS_EMBED_MODEL=sentence-transformers/LaBSE TS_EMBED_REVISION=836121a0533e5664b21c7aacc5d22951f2b8b25b
RUN |3 CLAUDE_CLI_VERSION=2.1.158 EMBED_MODEL=sentence-transformers/LaBSE EMBED_REVISION=836121a0533e5664b21c7aacc5d22951f2b8b25b /bin/sh -c python -c "import os; from sentence_transformers import SentenceTransformer; SentenceTransformer(os.environ['TS_EMBED_MODEL'], revision=os.environ['TS_EMBED_REVISION'], model_kwargs={'use_safetensors': True})" && find /opt/hf-cache -type f \( -name 'pytorch_model.bin' -o -name 'tf_model.h5' -o -name 'flax_model.msgpack' \) -delete && chmod -R a+rX,go-w /opt/hf-cache # buildkit
ARG QE_MODEL=Unbabel/wmt22-cometkiwi-da
ARG QE_REVISION=1ad785194e391eebc6c53e2d0776cada8f83179a
ENV TS_QE_MODEL=Unbabel/wmt22-cometkiwi-da TS_QE_REVISION=1ad785194e391eebc6c53e2d0776cada8f83179a
RUN |5 CLAUDE_CLI_VERSION=2.1.158 EMBED_MODEL=sentence-transformers/LaBSE EMBED_REVISION=836121a0533e5664b21c7aacc5d22951f2b8b25b QE_MODEL=Unbabel/wmt22-cometkiwi-da QE_REVISION=1ad785194e391eebc6c53e2d0776cada8f83179a /bin/sh -c if [ -n "$TS_QE_MODEL" ]; then if [ -f /run/secrets/hf_token ]; then export HF_TOKEN="$(tr -d '[:space:]' < /run/secrets/hf_token)" ; export HUGGING_FACE_HUB_TOKEN="$HF_TOKEN" ; if [ -n "$HF_TOKEN" ]; then echo '[bake QE] token HF présent (longueur '"${#HF_TOKEN}"').' ; else echo '[bake QE] ⚠ token HF VIDE après strip — secret mal renseigné.' ; fi ; else echo '[bake QE] ⚠ /run/secrets/hf_token ABSENT — le secret n_est pas passé au build (build.yml).' ; fi ; ( python -c "import os, glob; from huggingface_hub import snapshot_download; from comet import load_from_checkpoint; d=snapshot_download(repo_id=os.environ['TS_QE_MODEL'], revision=(os.environ.get('TS_QE_REVISION') or None)); load_from_checkpoint(glob.glob(os.path.join(d, 'checkpoints', '*.ckpt'))[0])" && chmod -R a+rX,go-w /opt/hf-cache ) || { echo '' ; echo '[bake QE] ÉCHEC du bake du modèle QE. Causes probables (voir le traceback ci-dessus) :' ; echo ' - 403 / GatedRepoError / "restricted" : licence du modèle PAS acceptée par le compte du token (va sur la page HF du modèle, clique « Agree/Access »).' ; echo ' - 401 / "Invalid credentials" : token HF invalide ou sans droit de lecture.' ; echo ' - RevisionNotFound / 404 revision : le SHA QE_REVISION est erroné.' ; exit 1 ; } ; else echo '[build] Bake QE désactivé (QE_MODEL vide).' ; fi # buildkit
ENV HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1
COPY src/ ./src/ # buildkit
COPY static/ ./static/ # buildkit
COPY scripts/ ./scripts/ # buildkit
RUN |5 CLAUDE_CLI_VERSION=2.1.158 EMBED_MODEL=sentence-transformers/LaBSE EMBED_REVISION=836121a0533e5664b21c7aacc5d22951f2b8b25b QE_MODEL=Unbabel/wmt22-cometkiwi-da QE_REVISION=1ad785194e391eebc6c53e2d0776cada8f83179a /bin/sh -c mkdir -p /app/data && chown -R appuser:appgroup /app # buildkit
COPY entrypoint.sh ./ # buildkit
RUN |5 CLAUDE_CLI_VERSION=2.1.158 EMBED_MODEL=sentence-transformers/LaBSE EMBED_REVISION=836121a0533e5664b21c7aacc5d22951f2b8b25b QE_MODEL=Unbabel/wmt22-cometkiwi-da QE_REVISION=1ad785194e391eebc6c53e2d0776cada8f83179a /bin/sh -c chmod +x entrypoint.sh # buildkit
LABEL net.unraid.docker.managed=dockerman
LABEL net.unraid.docker.webui=http://[IP]:[PORT:5001]/
EXPOSE [5001/tcp]
HEALTHCHECK {Test:[CMD-SHELL python -c "import urllib.request as u; u.urlopen('http://127.0.0.1:5001/login')" || exit 1] Interval:30s Timeout:5s StartPeriod:15s StartInterval:0s Retries:3}
CMD ["./entrypoint.sh"]

Labels

Key Value
net.unraid.docker.managed dockerman
net.unraid.docker.webui http://[IP]:[PORT:5001]/
org.opencontainers.image.created 2026-07-02T18:34:24.965Z
org.opencontainers.image.description
org.opencontainers.image.licenses
org.opencontainers.image.revision 6d581a77d44766b23edd854cad8333726554134f
org.opencontainers.image.source http://192.168.10.195:3000/thymon/TradScan
org.opencontainers.image.title TradScan
org.opencontainers.image.url http://192.168.10.195:3000/thymon/TradScan
org.opencontainers.image.version latest
Details
Container
2026-07-02 20:34:48 +02:00
0
OCI / Docker
Versions (69) View all
buildcache 2026-07-03
latest 2026-07-03
81ec65f 2026-07-03
6852719 2026-07-03
4797684 2026-07-03