diff --git a/Dockerfile.withset b/Dockerfile.withset index 4fd9a0b..6223739 100644 --- a/Dockerfile.withset +++ b/Dockerfile.withset @@ -9,4 +9,4 @@ COPY flake.nix flake.lock /piston/packages/ ARG RUNTIMESET=all ENV PISTON_RUNTIME_SET=$RUNTIMESET -RUN piston-install \ No newline at end of file +RUN piston-install diff --git a/api/src/job.js b/api/src/job.js index c562693..326595c 100644 --- a/api/src/job.js +++ b/api/src/job.js @@ -281,7 +281,7 @@ class Job { if (this.runtime.compiled) { eventBus.emit('stage', 'compile'); const { error, code, signal } = await this.safe_call( - path.join(this.runtime.pkgdir, 'compile'), + this.runtime.compile, code_files.map(x => x.name), this.timeouts.compile, this.memory_limits.compile, @@ -294,7 +294,7 @@ class Job { this.logger.debug('Running'); eventBus.emit('stage', 'run'); const { error, code, signal } = await this.safe_call( - path.join(this.runtime.pkgdir, 'run'), + this.runtime.run, [code_files[0].name, ...this.args], this.timeouts.run, this.memory_limits.run, diff --git a/piston b/piston index d6d13bf..4ac46bd 100755 --- a/piston +++ b/piston @@ -58,6 +58,10 @@ case "$SUBCOMMAND" in start-dev) build_base + runtime_set=all + if [[ ! -z "$1" ]]; then + runtime_set=$1 + fi docker run \ --rm \ -p 2000:2000 \ @@ -65,6 +69,7 @@ case "$SUBCOMMAND" in --name $CONTAINER_NAME \ -e PISTON_LOG_LEVEL=DEBUG \ -e PISTON_FLAKE_PATH=/piston/packages \ + -e PISTON_RUNTIME_SET=$runtime_set \ -v $PWD:/piston/packages \ -d "$IMAGE_NAME_DEV:$IMAGE_TAG" ;;