aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamruddhi Khandale <skhandale@microsoft.com>2022-10-27 01:20:47 +0300
committerGitHub <noreply@github.com>2022-10-27 01:20:47 +0300
commitab021f0dfb0b4d28a2a71fd4b8502f5cb0b72004 (patch)
treeb7bf0788729bbc94a168d876da52304514f77910
parent520a4abc40c1fe4c914638ea73b42f2bde09d8e9 (diff)
Fix oryx bug - Add PIP_CACHE_DIR (#239)
* oryx update * bump version * update comment
-rw-r--r--src/oryx/devcontainer-feature.json2
-rwxr-xr-xsrc/oryx/install.sh10
2 files changed, 9 insertions, 3 deletions
diff --git a/src/oryx/devcontainer-feature.json b/src/oryx/devcontainer-feature.json
index 2b88372..ba80780 100644
--- a/src/oryx/devcontainer-feature.json
+++ b/src/oryx/devcontainer-feature.json
@@ -1,6 +1,6 @@
{
"id": "oryx",
- "version": "1.0.8",
+ "version": "1.0.9",
"name": "Oryx",
"description": "Installs the oryx CLI",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/oryx",
diff --git a/src/oryx/install.sh b/src/oryx/install.sh
index f84cf22..054983a 100755
--- a/src/oryx/install.sh
+++ b/src/oryx/install.sh
@@ -157,17 +157,23 @@ chmod a+x ${BUILD_SCRIPT_GENERATOR}/GenerateBuildScript
ln -s ${BUILD_SCRIPT_GENERATOR}/GenerateBuildScript ${ORYX}/oryx
cp -f $GIT_ORYX/images/build/benv.sh ${ORYX}/benv
+cp -f $GIT_ORYX/images/build/logger.sh ${ORYX}/logger
ORYX_INSTALL_DIR="/opt"
mkdir -p "${ORYX_INSTALL_DIR}"
+# Directory used by the oryx tool to cache the automatically installed python packages from `requirements.txt`
+PIP_CACHE_DIR="/usr/local/share/pip-cache/lib"
+mkdir -p ${PIP_CACHE_DIR}
+
updaterc "export ORYX_SDK_STORAGE_BASE_URL=https://oryx-cdn.microsoft.io && export ENABLE_DYNAMIC_INSTALL=true && DYNAMIC_INSTALL_ROOT_DIR=$ORYX_INSTALL_DIR && ORYX_PREFER_USER_INSTALLED_SDKS=true && export DEBIAN_FLAVOR=focal-scm"
-chown -R "${USERNAME}:oryx" "${ORYX_INSTALL_DIR}" "${BUILD_SCRIPT_GENERATOR}" "${ORYX}"
-chmod -R g+r+w "${ORYX_INSTALL_DIR}" "${BUILD_SCRIPT_GENERATOR}" "${ORYX}"
+chown -R "${USERNAME}:oryx" "${ORYX_INSTALL_DIR}" "${BUILD_SCRIPT_GENERATOR}" "${ORYX}" "${PIP_CACHE_DIR}"
+chmod -R g+r+w "${ORYX_INSTALL_DIR}" "${BUILD_SCRIPT_GENERATOR}" "${ORYX}" "${PIP_CACHE_DIR}"
find "${ORYX_INSTALL_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s
find "${BUILD_SCRIPT_GENERATOR}" -type d -print0 | xargs -n 1 -0 chmod g+s
find "${ORYX}" -type d -print0 | xargs -n 1 -0 chmod g+s
+find "${PIP_CACHE_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s
# /opt/tmp/build and /opt/tmp/images is required by Oryx for dynamically installing platforms
cp -rf $GIT_ORYX/build /opt/tmp