hacnho commited on
Commit
09052d3
·
verified ·
1 Parent(s): 71846d4

Upload verify_remote_poc.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. verify_remote_poc.py +29 -1
verify_remote_poc.py CHANGED
@@ -19,7 +19,35 @@ FILES = [
19
 
20
  def build_classpath() -> str:
21
  repo = Path.home() / ".m2" / "repository"
22
- jars = sorted(str(p) for p in repo.rglob("*.jar"))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  if not jars:
24
  raise RuntimeError("no jars found under ~/.m2/repository")
25
  return ":".join(jars)
 
19
 
20
  def build_classpath() -> str:
21
  repo = Path.home() / ".m2" / "repository"
22
+ allowed_prefixes = (
23
+ "org/deeplearning4j/",
24
+ "org/nd4j/",
25
+ "org/bytedeco/",
26
+ "org/slf4j/",
27
+ "ch/qos/logback/",
28
+ "com/google/guava/",
29
+ "org/apache/commons/",
30
+ "commons-io/",
31
+ "commons-codec/",
32
+ "commons-net/",
33
+ "org/tukaani/",
34
+ "com/github/luben/",
35
+ "org/objenesis/",
36
+ "org/projectlombok/",
37
+ "org/codehaus/plexus/",
38
+ "com/fasterxml/",
39
+ "com/google/code/findbugs/",
40
+ "com/google/protobuf/",
41
+ "org/checkerframework/",
42
+ "org/openjdk/jol/",
43
+ "net/ericaro/",
44
+ )
45
+ jars = []
46
+ for p in repo.rglob("*.jar"):
47
+ rel = p.relative_to(repo).as_posix()
48
+ if rel.startswith(allowed_prefixes):
49
+ jars.append(str(p))
50
+ jars = sorted(jars)
51
  if not jars:
52
  raise RuntimeError("no jars found under ~/.m2/repository")
53
  return ":".join(jars)