mirror of
https://github.com/engineer-man/piston.git
synced 2025-06-07 10:46:27 +02:00
Compare commits
5 commits
2d595f1acf
...
4da7d94c71
Author | SHA1 | Date | |
---|---|---|---|
|
4da7d94c71 | ||
|
1d55a41a2d | ||
|
6ef0cdf7b4 | ||
|
c44fc86087 | ||
|
d66e6ac8dc |
5 changed files with 9 additions and 17 deletions
|
@ -156,7 +156,11 @@ class Job {
|
||||||
'-s',
|
'-s',
|
||||||
'-c',
|
'-c',
|
||||||
'/box/submission',
|
'/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=${this.runtime.pkgdir}`,
|
||||||
`--dir=/etc:noexec`,
|
`--dir=/etc:noexec`,
|
||||||
`--processes=${this.runtime.max_process_count}`,
|
`--processes=${this.runtime.max_process_count}`,
|
||||||
|
@ -175,10 +179,6 @@ class Job {
|
||||||
...args,
|
...args,
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
env: {
|
|
||||||
...this.runtime.env_vars,
|
|
||||||
PISTON_LANGUAGE: this.runtime.language,
|
|
||||||
},
|
|
||||||
stdio: 'pipe',
|
stdio: 'pipe',
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -178,15 +178,7 @@ class Runtime {
|
||||||
const env_file = path.join(this.pkgdir, '.env');
|
const env_file = path.join(this.pkgdir, '.env');
|
||||||
const env_content = fss.read_file_sync(env_file).toString();
|
const env_content = fss.read_file_sync(env_file).toString();
|
||||||
|
|
||||||
this._env_vars = {};
|
this._env_vars = env_content.trim().split('\n');
|
||||||
|
|
||||||
env_content
|
|
||||||
.trim()
|
|
||||||
.split('\n')
|
|
||||||
.map(line => line.split('=', 2))
|
|
||||||
.forEach(([key, val]) => {
|
|
||||||
this._env_vars[key.trim()] = val.trim();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._env_vars;
|
return this._env_vars;
|
||||||
|
|
2
packages/python/3.10.0/build.sh
vendored
2
packages/python/3.10.0/build.sh
vendored
|
@ -18,4 +18,4 @@ cd ..
|
||||||
|
|
||||||
rm -rf build
|
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
|
||||||
|
|
2
packages/python/3.11.0/build.sh
vendored
2
packages/python/3.11.0/build.sh
vendored
|
@ -18,4 +18,4 @@ cd ..
|
||||||
|
|
||||||
rm -rf build
|
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
|
||||||
|
|
2
packages/python/3.12.0/build.sh
vendored
2
packages/python/3.12.0/build.sh
vendored
|
@ -18,4 +18,4 @@ cd ..
|
||||||
|
|
||||||
rm -rf build
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue