Skip to content

Commit

Permalink
modify so the system settings do not interact with this
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Jan 14, 2025
1 parent 0389855 commit a4e9c9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class JavaWorker {
*/
public static void main(String[] args) {
System.clearProperty("PYTORCH_FLAVOR");
System.clearProperty("java.library.path");

try(Scanner scanner = new Scanner(System.in)){
PytorchInterface pi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import com.google.gson.Gson;

Expand Down Expand Up @@ -145,7 +146,13 @@ private Service getRunner() throws IOException, URISyntaxException {
String[] argArr = new String[args.size()];
args.toArray(argArr);

return new Service(new File("."), argArr);
Service service = new Service(new File("."), argArr);
service.setEnvVar("CUDA_HOME", null);
service.setEnvVar("CUDA_PATH", null);
service.setEnvVar("LD_LIBRARY_PATH", null);
service.setEnvVar("DYLD_LIBRARY_PATH", null);
service.setEnvVar("PATH", null);
return service;
}

/**
Expand Down

0 comments on commit a4e9c9d

Please sign in to comment.