Skip to content

Commit

Permalink
add details and TODOs about mkl and dependency checking
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Sep 9, 2024
1 parent 81d8990 commit 19eada4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
13 changes: 3 additions & 10 deletions src/main/java/ai/nets/samj/install/EfficientViTSamEnvManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,9 @@ public class EfficientViTSamEnvManager extends SamEnvManagerAbstract {
* Dependencies to be checked to make sure that the environment is able to load a SAM based model.
* General for every supported model.
*/
// TODO update final public static List<String> CHECK_DEPS = Arrays.asList(new String[] {"appose", "torch=2.0.1", "torchvision=0.15.2", "skimage", "mkl=2024.0.0"});
final public static List<String> CHECK_DEPS_EVSAM;
static {
if (!PlatformDetection.getArch().equals(PlatformDetection.ARCH_ARM64) && !PlatformDetection.isUsingRosseta())
CHECK_DEPS_EVSAM = Arrays.asList(new String[] {"appose", "torch", "torchvision",
"skimage", "onnxsim", "timm", "onnx", "segment_anything", "mkl"});
else
CHECK_DEPS_EVSAM = Arrays.asList(new String[] {"appose", "torch", "torchvision",
"skimage", "onnxsim", "timm", "onnx", "segment_anything"});
}
// TODO Find way to identify whether mkl is installed or not on non-macos machines
final public static List<String> CHECK_DEPS_EVSAM = Arrays.asList(new String[] {"appose", "torch", "torchvision",
"skimage", "onnxsim", "timm", "onnx", "segment_anything"});
/**
* Dependencies that have to be installed in any SAMJ created environment using Mamba or Conda
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/ai/nets/samj/install/Sam2EnvManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ public class Sam2EnvManager extends SamEnvManagerAbstract {
* Dependencies to be checked to make sure that the environment is able to load a SAM based model.
* General for every supported model.
*/
/**
* TODO add hard version deps when JDLL mamba is fixed
final public static List<String> CHECK_DEPS = Arrays.asList(new String[] {"appose", "torch=2.4.0",
"torchvision=0.19.0", "skimage", "sam2", "pytest"});
*/
final public static List<String> CHECK_DEPS = Arrays.asList(new String[] {"appose", "torch",
"torchvision", "skimage", "sam2", "pytest"});
/**
* Dependencies that have to be installed in any SAMJ created environment using Mamba or Conda
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public void downloadFile(String downloadURL, File targetFile, Thread parentThrea
URL website = new URL(downloadURL);
HttpURLConnection conn = (HttpURLConnection) website.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("User-Agent", CommonUtils.getJDLLUserAgent());//"jdll/0.5.6 (Linux; Java 1.8.0_292)");
conn.setRequestProperty("User-Agent", CommonUtils.getJDLLUserAgent());
rbc = Channels.newChannel(conn.getInputStream());
// TODO rbc = Channels.newChannel(website.openStream());
// Create the new model file as a zip
Expand Down

0 comments on commit 19eada4

Please sign in to comment.