File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM lightx2v/lightx2v:25111101-cu128 AS base
1+ ARG BASE_TAG=26011201-cu128
2+ FROM lightx2v/lightx2v:${BASE_TAG} AS base
23
34RUN mkdir /workspace/LightX2V
45WORKDIR /workspace/LightX2V
56ENV PYTHONPATH=/workspace/LightX2V
67
7- RUN pip install diffusers==0.37.1
8+ RUN pip install diffusers==0.37.1 librosa
89
910COPY tools tools
1011COPY assets assets
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -euo pipefail
3+
4+ SCRIPT_DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
5+ REPO_ROOT=" $( cd " $SCRIPT_DIR /.." && pwd) "
6+ DOCKERFILE=" $SCRIPT_DIR /Dockerfile_deploy"
7+
8+ AUTO_BASE_TAG=$( grep -oP ' ARG BASE_TAG=\K\S+' " $DOCKERFILE " | head -1)
9+ REGISTRY=" lightx2v/lightx2v"
10+ BASE_TAG=" $AUTO_BASE_TAG "
11+
12+ while [[ $# -gt 0 ]]; do
13+ case " $1 " in
14+ -t|--tag) BASE_TAG=" $2 " ; shift 2 ;;
15+ -r|--registry) REGISTRY=" $2 " ; shift 2 ;;
16+ -h|--help)
17+ echo " Usage: $0 [-t base_tag] [-r registry]"
18+ echo " -t, --tag Base image tag (default: $AUTO_BASE_TAG )"
19+ echo " -r, --registry Registry prefix (default: $REGISTRY )"
20+ exit 0
21+ ;;
22+ * ) echo " Unknown option: $1 " ; exit 1 ;;
23+ esac
24+ done
25+
26+ DATE_TAG=$( date +%y%m%d)
27+ GIT_HASH=$( git -C " $REPO_ROOT " rev-parse --short HEAD)
28+ IMAGE_TAG=" ${REGISTRY} :server-${BASE_TAG} -${DATE_TAG} -${GIT_HASH} "
29+
30+ echo " Base image tag: $BASE_TAG "
31+ echo " Building image: $IMAGE_TAG "
32+ docker buildx build --platform linux/amd64 -f " $DOCKERFILE " -t " $IMAGE_TAG " --build-arg BASE_TAG=" $BASE_TAG " " $REPO_ROOT "
You can’t perform that action at this time.
0 commit comments