The default environment is a clone of the root environment. It gets created for each project. If you do not want that option, the admin could follow the below steps from the latest version of AEN 4.3.2 to stop the default environment creation.
1. Take a back up of start-project script:
cp /opt/wakari/wakari-compute/etc/wakari/scripts/start-project /opt/wakari/wakari-compute/etc/wakari/scripts/start-project-bk
2. Remove or comment the following code from /opt/wakari/wakari-compute/etc/wakari/scripts/start-project, line number from 78 to 116.
if [ ! -d ${DEFAULT_ENV_DIR} ]; then
echo "Creating default project environment at" `date`
# set ownership of the project dir. this is safe because
# the env (and its hardlinks back to /opt/wakari/anaconda)
# doesn't exist yet.
$AEN_SUDO_CMD -u ${OWNER} $AEN_SUDO_SH mkdir -p ${PROJECT_HOME}/envs
# Command performed in AEN 4.1.0 and 4.1.1 when we were using conda 4.2.9
# set ownership of the project dir/envs to AEN_SRVC_ACCT to perform the clone step
# $AEN_SUDO_CMD chown -R ${AEN_SRVC_ACCT}:${AEN_SRVC_GRP} ${PROJECT_HOME}/envs
if [ ! -d "${SKELETON_ENV}" ]; then
SKELETON_ENV="root"
fi
# multi-user support in conda 4.3.14 is improved so we can do this without permission issues
if [ -n "${PROJ_DIRS_AS_HOME}" ]; then
OWNER_HOME=`dirname ${PROJECT_HOME}`
$AEN_SUDO_CMD -u ${OWNER} $AEN_SUDO_SH HOME=${OWNER_HOME} /opt/wakari/anaconda/bin/conda create -v -p ${DEFAULT_ENV_DIR} --clone "${SKELETON_ENV}"
else
$AEN_SUDO_CMD -u ${OWNER} $AEN_SUDO_SH /opt/wakari/anaconda/bin/conda create -v -p ${DEFAULT_ENV_DIR} --clone "${SKELETON_ENV}"
fi
# Commands performed in AEN 4.1.0 and 4.1.1 when we were using conda 4.2.9
# echo "Cloning env as AEN_SRV_ACCT and chown to OWNER"
# $AEN_SUDO_CMD -u ${AEN_SRVC_ACCT} $AEN_SUDO_SH /opt/wakari/anaconda/bin/conda create -p ${DEFAULT_ENV_DIR} --clone "${SKELETON_ENV}" --offline
# $AEN_SUDO_CMD chown -R ${OWNER}:${OWNER} ${PROJECT_HOME}/envs
# if [ $SKELETON_ENV == "root" ]; then
# # why is conda-env cloned from the root environment??
# $AEN_SUDO_CMD -u ${OWNER} $AEN_SUDO_SH /opt/wakari/anaconda/bin/conda remove -p ${DEFAULT_ENV_DIR} conda-env --yes --quiet
# fi
$AEN_SUDO_CMD -u ${OWNER} $AEN_SUDO_SH /opt/wakari/wakari-compute/bin/wk-project-env ${PROJECT_HOME} ${DEFAULT_ENV_DIR}
echo "Done creating environment at" `date`
else
echo "Project environment already exists. Not creating it."
fi
3. Restart the compute service:
sudo service wakari-compute restart
Users will not see the default environment in new projects anymore. Existing projects will have a default environment until the admin deletes them manually.
Please contact the Anaconda Enterprise Support team if you want to stop the default environment creation for other versions.