Ещё фиксы от ИИ
All checks were successful
Build and Push Docker Images / build (src/LiquidCode.Tester.Gateway/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-gateway-roman, gateway) (push) Successful in 57s
Build and Push Docker Images / build (src/LiquidCode.Tester.Worker/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-worker-roman, worker) (push) Successful in 1m17s
All checks were successful
Build and Push Docker Images / build (src/LiquidCode.Tester.Gateway/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-gateway-roman, gateway) (push) Successful in 57s
Build and Push Docker Images / build (src/LiquidCode.Tester.Worker/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-worker-roman, worker) (push) Successful in 1m17s
This commit is contained in:
@@ -55,8 +55,15 @@ public class PythonExecutionServiceIsolate : IExecutionService
|
||||
|
||||
File.Copy(executablePath, boxScriptPath, overwrite: true);
|
||||
|
||||
// Prepare output file in box
|
||||
// Prepare input/output files inside the sandbox
|
||||
var outputFilePath = Path.Combine(boxDir, "output.txt");
|
||||
string? sandboxInputPath = null;
|
||||
|
||||
if (!string.IsNullOrEmpty(inputFilePath) && File.Exists(inputFilePath))
|
||||
{
|
||||
sandboxInputPath = Path.Combine(boxDir, "input.txt");
|
||||
File.Copy(inputFilePath, sandboxInputPath, overwrite: true);
|
||||
}
|
||||
|
||||
// Get Python executable from configuration
|
||||
var pythonExecutable = _configuration["Python:Executable"] ?? "python3";
|
||||
@@ -73,7 +80,7 @@ public class PythonExecutionServiceIsolate : IExecutionService
|
||||
StackLimitKb = 256 * 1024,
|
||||
ProcessLimit = 1, // Single process for Python
|
||||
EnableNetwork = false,
|
||||
StdinFile = inputFilePath,
|
||||
StdinFile = sandboxInputPath,
|
||||
StdoutFile = outputFilePath,
|
||||
WorkingDirectory = "/box"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user