Skip to content

Commit

Permalink
script and internal qa updates
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 committed Sep 9, 2024
1 parent 4382410 commit c7f1214
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deploy/qa-int-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ namespace: nlp
auth0Domain: sil-appbuilder.auth0.com
lokiTenent: nlp-tenant
lokiUrl: http://loki-distributed-gateway.loki.svc.cluster.local
servalImage: ghcr.io/sillsdev/serval:1.5.5.1
ClearMLDockerImage: ghcr.io/sillsdev/machine.py:1.5.4
servalImage: ghcr.io/sillsdev/serval:1.6.lock_fix3
ClearMLDockerImage: ghcr.io/sillsdev/machine.py:1.6.small_fixes0
ClearMLQueue: lambert_24gb
MongoConnectionPrefix: qa_int_
SharedFileLocation: s3://silnlp/int-qa/
Expand Down
24 changes: 24 additions & 0 deletions scripts/calculate_s3_size.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# %%
import boto3

bucket_name = "silnlp"
prefix = ""
total_sizes = {}

counter = 0
for obj in boto3.resource("s3").Bucket(bucket_name).objects.filter(Prefix=prefix):
key = obj.key
prefix = key.split("/")[0]
if prefix not in total_sizes:
total_sizes[prefix] = 0
total_sizes[prefix] += obj.size
counter += 1
if counter % 10_000 == 0:
for prefix, size in total_sizes.items():
print(f"{prefix}: {size/1e6:.2f} MB")
if counter > 1_000_000:
break
for prefix, size in total_sizes.items():
print(f"{prefix}: {size/1e6:.2f} MB")

# %%
3 changes: 2 additions & 1 deletion src/Machine/src/Serval.Machine.JobServer/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"Queue": "jobs_backlog",
"DockerImage": "ghcr.io/sillsdev/machine.py:latest"
}
]
],
"PreserveBuildFiles": true
},
"SmtTransferEngine": {
"EnginesDir": "/var/lib/machine/engines"
Expand Down

0 comments on commit c7f1214

Please sign in to comment.