-
Notifications
You must be signed in to change notification settings - Fork 0
/
vkm.env
executable file
·49 lines (38 loc) · 1.51 KB
/
vkm.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
JUST_PROJECT_PREFIX=VKM
VKM_CWD="${CWD-"$(\cd "$(\dirname "${BASH_SOURCE[0]}")"; \pwd)"}"
: ${VKM_DOCKER_REPO=vsiri/vkm}
# user variables
: ${VKM_USERNAME=$(id -u -n)}
: ${VKM_UID=$(id -u)}
: ${VKM_GIDS=$(id -G)}
: ${VKM_GROUP_NAMES=$(group_names)}
: ${VKM_USERNAME_DOCKER=user}
: ${VKM_HOME_DOCKER=/home/${VKM_USERNAME_DOCKER}}
# host directories
: ${VKM_SOURCE_DIR=${VKM_CWD}}
: ${VKM_BUILD_DIR=vkm-build}
: ${VKM_INSTALL_DIR=vkm-bin}
: ${VKM_VENV_DIR=vkm-venv}
# docker directories
: ${VKM_SOURCE_DIR_DOCKER=${VSI_PATH_ESC}/src}
: ${VKM_BUILD_DIR_DOCKER=${VSI_PATH_ESC}/build}
: ${VKM_INSTALL_DIR_DOCKER=${VSI_PATH_ESC}/install}
: ${VKM_VENV_DIR_DOCKER=${VSI_PATH_ESC}/venv}
# cmake/build settings
: ${VKM_FORCE_RUN_CMAKE=0}
: ${VKM_BUILD_TYPE=Release}
# docker-compose runtime (requires docker-compose > 1.20)
: ${VKM_DOCKER_RUNTIME="$([[ "$(nvidia-docker version 2>/dev/null)" = "NVIDIA Docker: 2"* ]] && echo nvidia)"}
#########################
### Non-VKM Setting ###
#########################
# Put variables that do not begin with VKM here.
# Use this to add the user name to the docker-compose project name. This is
# important when multiple users are using this docker-compose project on a
# single host. This way all of the docker resources are prefixed with a unique
# name and do not collide
source "${VSI_COMMON_DIR}/linux/docker_functions.bsh"
: ${COMPOSE_PROJECT_NAME=$(docker_compose_sanitize_project_name "${VKM_CWD}" "${VKM_USERNAME}")}
if [ "${OS-}" = "Windows_NT" ]; then
: ${COMPOSE_CONVERT_WINDOWS_PATHS=1}
fi