Skip to content

Commit

Permalink
check fixed deps
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 2, 2024
1 parent f189c50 commit b56dc92
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@

<!-- NB: Deploy releases to the SciJava Maven repository. -->
<releaseProfiles>sign,deploy-to-scijava</releaseProfiles>
<dl-modelrunner.version>0.5.9</dl-modelrunner.version>
<dl-modelrunner.version>0.5.10-SNAPSHOT</dl-modelrunner.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ public class EfficientSamEnvManager 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 = Arrays.asList(new String[] {"appose", "torch", "torchvision", "skimage"});
final public static List<String> CHECK_DEPS = Arrays.asList(new String[] {"appose", "torch=2.4.0",
"torchvision=0.19.0", "skimage"});
/**
* Dependencies that have to be installed in any SAMJ created environment using Mamba or Conda
*/
final public static List<String> INSTALL_CONDA_DEPS;
static {
if (!PlatformDetection.getArch().equals(PlatformDetection.ARCH_ARM64) && !PlatformDetection.isUsingRosseta())
INSTALL_CONDA_DEPS = Arrays.asList(new String[] {"libpng", "libjpeg-turbo",
"scikit-image", "pytorch=2.0.1", "torchvision=0.15.2", "cpuonly"});
"scikit-image", "pytorch=2.4.0", "torchvision=0.19.0", "cpuonly"});
else
INSTALL_CONDA_DEPS = Arrays.asList(new String[] {"libpng", "libjpeg-turbo",
"scikit-image", "pytorch=2.4.1", "torchvision=0.19.0", "cpuonly"});
"scikit-image", "pytorch=2.4.0", "torchvision=0.19.0", "cpuonly"});
}
/**
* Dependencies for every environment that need to be installed using PIP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ 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 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",
final public static List<String> CHECK_DEPS_EVSAM = Arrays.asList(new String[] {"appose", "torch=2.4.0", "torchvision=0.19.0",
"skimage", "onnxsim", "timm", "onnx", "segment_anything"});
/**
* Dependencies that have to be installed in any SAMJ created environment using Mamba or Conda
Expand All @@ -76,10 +75,10 @@ public class EfficientViTSamEnvManager extends SamEnvManagerAbstract {
static {
if (!PlatformDetection.getArch().equals(PlatformDetection.ARCH_ARM64) && !PlatformDetection.isUsingRosseta())
INSTALL_CONDA_DEPS = Arrays.asList(new String[] {"libpng", "libjpeg-turbo",
"scikit-image", "pytorch=2.0.1", "torchvision=0.15.2", "cpuonly"});
"scikit-image", "pytorch=2.4.0", "torchvision=0.19.0", "cpuonly"});
else
INSTALL_CONDA_DEPS = Arrays.asList(new String[] {"libpng", "libjpeg-turbo",
"scikit-image", "pytorch=2.0.1", "torchvision=0.15.2", "cpuonly"});
"scikit-image", "pytorch=2.4.0", "torchvision=0.19.0", "cpuonly"});
}
/**
* Dependencies that have to be installed using Mamba or Conda in environments that are going
Expand Down
10 changes: 3 additions & 7 deletions src/main/java/ai/nets/samj/install/Sam2EnvManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,13 @@ public class Sam2EnvManager extends SamEnvManagerAbstract {
* Name of the file that contains the weights of SAM Huge
*/
final public static String SAM2_LARGE_WEIGHTS_NAME = "sam2_hiera_large.pth";
/*
* 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"});
*/

/**
* Dependencies to be checked to make sure that the environment is able to load a SAM based model.
* General for every supported model.
*/
final public static List<String> CHECK_DEPS = Arrays.asList(new String[] {"appose", "torch",
"torchvision", "skimage", "sam2", "pytest"});
final public static List<String> CHECK_DEPS = Arrays.asList(new String[] {"appose", "torch=2.4.0",
"torchvision=0.19.0", "skimage", "sam2", "pytest"});
/**
* Dependencies that have to be installed in any SAMJ created environment using Mamba or Conda
*/
Expand Down

0 comments on commit b56dc92

Please sign in to comment.