Pass env vars as build-args, ensure node modules isn't getting passed in

This commit is contained in:
Brandon Rising 2023-06-27 00:33:58 -04:00 committed by Eugene Brodsky
parent 3b1eeda4d4
commit 674f42ba9a
4 changed files with 13 additions and 2 deletions

View File

@ -3,3 +3,5 @@
!pyproject.toml !pyproject.toml
!docker/docker-entrypoint.sh !docker/docker-entrypoint.sh
!LICENSE !LICENSE
node_modules

View File

@ -21,7 +21,7 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ARG TORCH_VERSION=2.0.1 ARG TORCH_VERSION=2.0.1
ARG TORCHVISION_VERSION=0.15.2 ARG TORCHVISION_VERSION=0.15.2
ARG GPU_DRIVER=cuda ARG GPU_DRIVER=cuda
ARG TARGETPLATFORM ARG TARGETPLATFORM="linux/amd64"
# unused but available # unused but available
ARG BUILDPLATFORM ARG BUILDPLATFORM

View File

@ -1,4 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
docker-compose build build_args=""
[[ -f ".env" ]] && build_args=$(awk '$1 ~ /\=/ {print "--build-arg " $0 " "}' .env)
echo "docker-compose build args:"
echo $build_args
docker-compose build $build_args

View File

@ -34,6 +34,8 @@ services:
volumes: volumes:
- ${INVOKEAI_ROOT:-~/invokeai}:${INVOKEAI_ROOT:-/invokeai} - ${INVOKEAI_ROOT:-~/invokeai}:${INVOKEAI_ROOT:-/invokeai}
- ${HF_HOME:-~/.cache/huggingface}:${HF_HOME:-/invokeai/.cache/huggingface} - ${HF_HOME:-~/.cache/huggingface}:${HF_HOME:-/invokeai/.cache/huggingface}
# - ${INVOKEAI_MODELS_DIR:-${INVOKEAI_ROOT:-/invokeai/models}}
# - ${INVOKEAI_MODELS_CONFIG_PATH:-${INVOKEAI_ROOT:-/invokeai/configs/models.yaml}}
tty: true tty: true
stdin_open: true stdin_open: true