diff --git a/docker/main/dataservice/entrypoint.sh b/docker/main/dataservice/entrypoint.sh index e42ae462d..433ecc801 100644 --- a/docker/main/dataservice/entrypoint.sh +++ b/docker/main/dataservice/entrypoint.sh @@ -62,7 +62,7 @@ if [ -d ${UPDATED_PACKAGES_DIR:=/updated_packages} ]; then for srv in $(pip -qq freeze | grep dmod | awk -F= '{print $1}' | awk -F- '{print $2}'); do if [ $(ls ${UPDATED_PACKAGES_DIR} | grep dmod.${srv}- | wc -l) -eq 1 ]; then pip uninstall -y --no-input $(pip -qq freeze | grep dmod.${srv} | awk -F= '{print $1}') - pip install $(ls ${UPDATED_PACKAGES_DIR}/*.whl | grep dmod.${srv}-) + pip install --no-deps $(ls ${UPDATED_PACKAGES_DIR}/*.whl | grep dmod.${srv}-) fi done #pip install ${UPDATED_PACKAGES_DIR}/*.whl diff --git a/docker/main/docker-deploy.yml b/docker/main/docker-deploy.yml index 665668e58..cefdbaeb8 100644 --- a/docker/main/docker-deploy.yml +++ b/docker/main/docker-deploy.yml @@ -88,6 +88,9 @@ services: - DATA_SERVICE_ENDPOINT_HOST=${DOCKER_REQUESTS_DATASERVICE_ENDPOINT_HOST:-data-service} - DATA_SERVICE_ENDPOINT_PORT=${DOCKER_DATASERVICE_CONTAINER_PORT:-3015} - DATA_SERVICE_CLIENT_SSL_DIR=${DOCKER_REQUESTS_CONTAINER_DATASERVICE_CLIENT_SSL_DIR:-/ssl/dataservice} + - EVALUATION_SERVICE_ENDPOINT_HOST=${DOCKER_REQUESTS_EVALUATIONSERVICE_ENDPOINT_HOST:-evaluation-service} + - EVALUATION_SERVICE_ENDPOINT_PORT=${DOCKER_EVALUATIONSERVICE_CONTAINER_PORT:-3015} + - EVALUATION_SERVICE_CLIENT_SSL_DIR=${DOCKER_REQUESTS_CONTAINER_EVALUATIONSERVICE_CLIENT_SSL_DIR:-/ssl/evaluationservice} - PARTITIONER_SERVICE_ENDPOINT_HOST=${DOCKER_REQUESTS_PARTITIONERSERVICE_ENDPOINT_HOST:-partitioner-service} - PARTITIONER_SERVICE_ENDPOINT_PORT=${DOCKER_PARTITIONER_SERVICE_CONTAINER_PORT:-3014} - PARTITIONER_SERVICE_CLIENT_SSL_DIR=${DOCKER_REQUESTS_CONTAINER_PARTITIONERSERVICE_CLIENT_SSL_DIR:-/ssl/partitionerservice} @@ -128,9 +131,11 @@ services: - LISTEN_PORT=${DOCKER_SUBSET_CONTAINER_PORT:-5000} - SERVICE_PACKAGE_NAME=${PYTHON_PACKAGE_NAME_SUBSET_SERVICE:?} - FILES_DIRECTORY=/hydrofabric_data + - PYCHARM_REMOTE_DEBUG_ACTIVE=${PYCHARM_REMOTE_DEBUG_SUBSET_SERVICE_ACTIVE:-false} + - PYCHARM_REMOTE_DEBUG_SERVER_HOST=${PYCHARM_REMOTE_DEBUG_SERVER_HOST:-host.docker.internal} + - PYCHARM_REMOTE_DEBUG_SERVER_PORT=${PYCHARM_REMOTE_DEBUG_SERVER_PORT_SUBSET_SERVICE:-55874} # This typically needs to be commented out; intended for development use (see related 'volume' config below) #- UPDATED_PACKAGES_DIR=${UPDATED_PACKAGES_CONTAINER_DIR:?Updated packages directory not set, make sure this should be active} - entrypoint: ["python3", "-m", "${PYTHON_PACKAGE_NAME_SUBSET_SERVICE:?}"] command: ["--files-directory", "/hydrofabric_data", "--port", "${DOCKER_SUBSET_CONTAINER_PORT:-5000}", "--crosswalk-file", "${HYRDOFABRIC_CROSSWALK_FILE_BASENAME:-crosswalk.json}"] diff --git a/docker/main/requestservice/entrypoint.sh b/docker/main/requestservice/entrypoint.sh index da38e9ec7..2dcae593a 100755 --- a/docker/main/requestservice/entrypoint.sh +++ b/docker/main/requestservice/entrypoint.sh @@ -54,6 +54,9 @@ python -m ${SERVICE_PACKAGE_NAME:?} \ --data-service-host ${DATA_SERVICE_ENDPOINT_HOST:?} \ --data-service-port ${DATA_SERVICE_ENDPOINT_PORT:?} \ --data-service-ssl-dir ${DATA_SERVICE_CLIENT_SSL_DIR:?} \ + --evaluation-service-host ${EVALUATION_SERVICE_ENDPOINT_HOST:?} \ + --evaluation-service-port ${EVALUATION_SERVICE_ENDPOINT_PORT:?} \ + --evaluation-service-ssl-dir ${EVALUATION_SERVICE_CLIENT_SSL_DIR:?} \ --partitioner-service-host ${PARTITIONER_SERVICE_ENDPOINT_HOST:?} \ --partitioner-service-port ${PARTITIONER_SERVICE_ENDPOINT_PORT:?} \ --partitioner-service-ssl-dir ${PARTITIONER_SERVICE_CLIENT_SSL_DIR:?} diff --git a/docker/main/s3fs-volume-helper/Dockerfile b/docker/main/s3fs-volume-helper/Dockerfile index b8a261aeb..39100f924 100644 --- a/docker/main/s3fs-volume-helper/Dockerfile +++ b/docker/main/s3fs-volume-helper/Dockerfile @@ -1,8 +1,8 @@ FROM alpine:3.15 -RUN apk update && apk upgrade && apk add docker bash && mkdir -p /dmod/scripts +RUN apk update && apk upgrade && apk add docker bash && mkdir -p /dmod -COPY ./scripts/* /dmod/scripts/. +COPY ./scripts /dmod/scripts ENV OUT_OF_GIT_REPO='true' diff --git a/docker/main/subsetservice/entrypoint.sh b/docker/main/subsetservice/entrypoint.sh index cfc3728de..65eae6335 100755 --- a/docker/main/subsetservice/entrypoint.sh +++ b/docker/main/subsetservice/entrypoint.sh @@ -12,6 +12,23 @@ if [ -n "${VENV_DIR:-}" ]; then pip install --update -r /code/requirements.txt fi +# Install for debugging when appropriate +if [ "$(echo "${PYCHARM_REMOTE_DEBUG_ACTIVE:-false}" | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]')" = "true" ]; then + _DEBUG_ARG="--pycharm-remote-debug" +fi + +# Handle some things in any cases when there is debugging +if [ -n "${_DEBUG_ARG:-}" ]; then + # Append these as well if appropriate, though defaults are coded (and they are somewhat agnostic to the debug setup) + if [ -n "${PYCHARM_REMOTE_DEBUG_SERVER_HOST:-}" ]; then + _DEBUG_ARG="${_DEBUG_ARG:-} --remote-debug-host ${PYCHARM_REMOTE_DEBUG_SERVER_HOST}" + fi + + if [ -n "${PYCHARM_REMOTE_DEBUG_SERVER_PORT:-}" ]; then + _DEBUG_ARG="${_DEBUG_ARG:-} --remote-debug-port ${PYCHARM_REMOTE_DEBUG_SERVER_PORT}" + fi +fi + # If we find this directory, and if there are wheels in it, then install those if [ -d ${UPDATED_PACKAGES_DIR:=/updated_packages} ]; then if [ $(ls ${UPDATED_PACKAGES_DIR}/*.whl | wc -l) -gt 0 ]; then @@ -44,4 +61,4 @@ fi #set +e #export PYTHONASYNCIODEBUG=1 -python3 -m ${SERVICE_PACKAGE_NAME:?} ${args} \ No newline at end of file +python3 -m ${SERVICE_PACKAGE_NAME:?} ${_DEBUG_ARG:-} ${args} \ No newline at end of file diff --git a/docker/py-sources/py-deps.Dockerfile b/docker/py-sources/py-deps.Dockerfile index 9a0ff75fe..da6d7e35b 100644 --- a/docker/py-sources/py-deps.Dockerfile +++ b/docker/py-sources/py-deps.Dockerfile @@ -1,4 +1,4 @@ -ARG REQUIRE="gcc g++ musl-dev gdal-dev libffi-dev openssl-dev rust cargo git proj proj-dev proj-util openblas openblas-dev lapack lapack-dev" +ARG REQUIRE="gcc g++ musl-dev gdal-dev libffi-dev openssl-dev rust cargo git proj proj-dev proj-util openblas openblas-dev lapack lapack-dev geos-dev" ################################################################################################################ ################################################################################################################ ##### Create foundational level build stage with initial structure diff --git a/example.env b/example.env index 637e9e5ce..bafbc8e63 100644 --- a/example.env +++ b/example.env @@ -108,6 +108,11 @@ TROUTE_BRANCH=ngen ## Python Packages Settings ## ######################################################################## +## The "name" of the built client Python distribution package, for purposes of installing (e.g., via pip) +PYTHON_PACKAGE_DIST_NAME_CLIENT=dmod-client +## The name of the actual Python communication package (i.e., for importing or specifying as a module on the command line) +PYTHON_PACKAGE_NAME_CLIENT=dmod.client + ## The "name" of the built communication Python distribution package, for purposes of installing (e.g., via pip) PYTHON_PACKAGE_DIST_NAME_COMMS=dmod-communication ## The name of the actual Python communication package (i.e., for importing or specifying as a module on the command line) diff --git a/scripts/init_object_store_dataset_volumes.sh b/scripts/init_object_store_dataset_volumes.sh index 156a53646..284bdea50 100755 --- a/scripts/init_object_store_dataset_volumes.sh +++ b/scripts/init_object_store_dataset_volumes.sh @@ -167,7 +167,7 @@ while [ ${#} -gt 0 ]; do DO_REMOVE_ALL='true' ;; --sentinel|-S) - SENTINEL="/tmp/${2:?}" + SENTINEL="${2:?}" shift ;; --service-mode)