diff --git a/api/src/job.js b/api/src/job.js index d46120b..8c3fa79 100644 --- a/api/src/job.js +++ b/api/src/job.js @@ -156,7 +156,11 @@ class Job { '-s', '-c', '/box/submission', - '-e', + '-E', + 'HOME=/tmp', + ...this.runtime.env_vars.flat_map(v => ['-E', v]), + '-E', + `PISTON_LANGUAGE=${this.runtime.language}`, `--dir=${this.runtime.pkgdir}`, `--dir=/etc:noexec`, `--processes=${this.runtime.max_process_count}`, @@ -175,10 +179,6 @@ class Job { ...args, ], { - env: { - ...this.runtime.env_vars, - PISTON_LANGUAGE: this.runtime.language, - }, stdio: 'pipe', } ); diff --git a/api/src/runtime.js b/api/src/runtime.js index 9a2adf4..90a2225 100644 --- a/api/src/runtime.js +++ b/api/src/runtime.js @@ -178,15 +178,7 @@ class Runtime { const env_file = path.join(this.pkgdir, '.env'); const env_content = fss.read_file_sync(env_file).toString(); - this._env_vars = {}; - - env_content - .trim() - .split('\n') - .map(line => line.split('=', 2)) - .forEach(([key, val]) => { - this._env_vars[key.trim()] = val.trim(); - }); + this._env_vars = env_content.trim().split('\n'); } return this._env_vars; diff --git a/packages/python/3.10.0/build.sh b/packages/python/3.10.0/build.sh index 62fef92..24315d5 100755 --- a/packages/python/3.10.0/build.sh +++ b/packages/python/3.10.0/build.sh @@ -18,4 +18,4 @@ cd .. rm -rf build -bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib sympy xxhash base58 cryptography PyNaCl +bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib sympy xxhash base58 cryptography PyNaCl pydantic geopy geojson h3==4.0.0b4 diff --git a/packages/python/3.11.0/build.sh b/packages/python/3.11.0/build.sh index 8db680c..538194c 100644 --- a/packages/python/3.11.0/build.sh +++ b/packages/python/3.11.0/build.sh @@ -18,4 +18,4 @@ cd .. rm -rf build -bin/pip3 install numpy scipy pandas pycryptodome whoosh bcrypt passlib sympy xxhash base58 cryptography PyNaCl +bin/pip3 install numpy scipy pandas pycryptodome whoosh bcrypt passlib sympy xxhash base58 cryptography PyNaCl pydantic geopy geojson h3==4.0.0b4 diff --git a/packages/python/3.12.0/build.sh b/packages/python/3.12.0/build.sh index 4de24a7..0609a97 100644 --- a/packages/python/3.12.0/build.sh +++ b/packages/python/3.12.0/build.sh @@ -18,4 +18,4 @@ cd .. rm -rf build -bin/pip3 install numpy scipy pandas pycryptodome whoosh bcrypt passlib sympy xxhash base58 cryptography PyNaCl +bin/pip3 install numpy scipy pandas pycryptodome whoosh bcrypt passlib sympy xxhash base58 cryptography PyNaCl pydantic geopy geojson h3==4.0.0b4