dayhoff-tools 1.10.2__py3-none-any.whl → 1.10.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dayhoff-tools might be problematic. Click here for more details.

@@ -152,7 +152,9 @@ def build_job_image(config: dict) -> str:
152
152
 
153
153
  print("\nBuilding Docker image: ", image_uri)
154
154
  print(f"Using Dockerfile: {docker_config['dockerfile']}")
155
- print(f"Using shared memory: {docker_config['shared_memory']}\n")
155
+ print(f"Using shared memory: {docker_config['shared_memory']}")
156
+ platform = docker_config.get("platform", "linux/amd64")
157
+ print(f"Building for platform: {platform}\n")
156
158
 
157
159
  # Build the image
158
160
  build_image_command = [
@@ -163,8 +165,14 @@ def build_job_image(config: dict) -> str:
163
165
  docker_config["dockerfile"],
164
166
  "-t",
165
167
  image_uri,
166
- ".", # Use the root of the repo as image context
167
168
  ]
169
+
170
+ # Add platform specification if provided, default to linux/amd64 for cloud deployments
171
+ platform = docker_config.get("platform", "linux/amd64")
172
+ build_image_command.extend(["--platform", platform])
173
+
174
+ # Add build context
175
+ build_image_command.append(".") # Use the root of the repo as image context
168
176
  subprocess.run(build_image_command, check=True)
169
177
 
170
178
  # Get and print image size
@@ -477,10 +477,21 @@ def submit_aws_batch_job(
477
477
  print(f"Setting retry attempts to {retry_attempts}")
478
478
  job_submit_args["retryStrategy"] = {"attempts": retry_attempts}
479
479
 
480
- # Add tags if specified in config
480
+ # Automatically add User tag for cost tracking
481
+ username = os.getenv("LOCAL_USER", "unknown_user")
482
+ default_tags = {"User": username}
483
+
484
+ # Merge with any tags specified in config (config tags take precedence)
481
485
  if "tags" in aws_config:
482
- job_submit_args["tags"] = aws_config["tags"]
483
- print(f"Adding tags to batch job: {aws_config['tags']}")
486
+ tags = {**default_tags, **aws_config["tags"]}
487
+ else:
488
+ tags = default_tags
489
+
490
+ job_submit_args["tags"] = tags
491
+ job_submit_args["propagateTags"] = (
492
+ True # Propagate tags to ECS tasks and EC2 instances
493
+ )
494
+ print(f"Adding tags to batch job: {tags}")
484
495
 
485
496
  # Submit the job using the session client
486
497
  response = batch.submit_job(**job_submit_args)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: dayhoff-tools
3
- Version: 1.10.2
3
+ Version: 1.10.4
4
4
  Summary: Common tools for all the repos at Dayhoff Labs
5
5
  Author: Daniel Martin-Alarcon
6
6
  Author-email: dma@dayhofflabs.com
@@ -10,6 +10,7 @@ Classifier: Programming Language :: Python :: 3.10
10
10
  Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
12
  Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
13
14
  Provides-Extra: embedders
14
15
  Provides-Extra: full
15
16
  Requires-Dist: biopython (>=1.84) ; extra == "full"
@@ -13,8 +13,8 @@ dayhoff_tools/cli/engine/studio_commands.py,sha256=VwTQujz32-uMcYusDRE73SdzRpgvI
13
13
  dayhoff_tools/cli/main.py,sha256=yXedWjo6hyvYd8N7IowE7Xpm9hO75ZSJmzNQIKwOp2A,5924
14
14
  dayhoff_tools/cli/swarm_commands.py,sha256=5EyKj8yietvT5lfoz8Zx0iQvVaNgc3SJX1z2zQR6o6M,5614
15
15
  dayhoff_tools/cli/utility_commands.py,sha256=WQTHOh1MttuxaJjl2c6zMa4x7_JuaKMQgcyotYrU3GA,25883
16
- dayhoff_tools/deployment/base.py,sha256=mYp560l6hSDFtyY2H42VoM8k9VUzfwuiyh9Knqpgc28,17441
17
- dayhoff_tools/deployment/deploy_aws.py,sha256=GvZpE2YIFA5Dl9rkAljFjtUypmPDNbWgw8NicHYTP24,18265
16
+ dayhoff_tools/deployment/base.py,sha256=48KE76QlWMeIZJefcBOZVbyChS2V_mgs7IQ31odPV2o,17806
17
+ dayhoff_tools/deployment/deploy_aws.py,sha256=gfqh09hGbz0q3oPqVm0imd_CEjKF2k8moGNRIL26qqE,18614
18
18
  dayhoff_tools/deployment/deploy_gcp.py,sha256=xgaOVsUDmP6wSEMYNkm1yRNcVskfdz80qJtCulkBIAM,8860
19
19
  dayhoff_tools/deployment/deploy_utils.py,sha256=StFwbqnr2_FWiKVg3xnJF4kagTHzndqqDkpaIOaAn_4,26027
20
20
  dayhoff_tools/deployment/job_runner.py,sha256=hljvFpH2Bw96uYyUup5Ths72PZRL_X27KxlYzBMgguo,5086
@@ -33,7 +33,7 @@ dayhoff_tools/intake/uniprot.py,sha256=BZYJQF63OtPcBBnQ7_P9gulxzJtqyorgyuDiPeOJq
33
33
  dayhoff_tools/logs.py,sha256=DKdeP0k0kliRcilwvX0mUB2eipO5BdWUeHwh-VnsICs,838
34
34
  dayhoff_tools/sqlite.py,sha256=jV55ikF8VpTfeQqqlHSbY8OgfyfHj8zgHNpZjBLos_E,18672
35
35
  dayhoff_tools/warehouse.py,sha256=UETBtZD3r7WgvURqfGbyHlT7cxoiVq8isjzMuerKw8I,24475
36
- dayhoff_tools-1.10.2.dist-info/METADATA,sha256=51y8FBWsnRYCBIFrbUgF6Ald5OydPPcVaIlhZKWCr60,2915
37
- dayhoff_tools-1.10.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
38
- dayhoff_tools-1.10.2.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
39
- dayhoff_tools-1.10.2.dist-info/RECORD,,
36
+ dayhoff_tools-1.10.4.dist-info/METADATA,sha256=9VTAmH2lOjeCoBGTIpp7EefUUSgGi37DM_4NvboAvGw,2966
37
+ dayhoff_tools-1.10.4.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
38
+ dayhoff_tools-1.10.4.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
39
+ dayhoff_tools-1.10.4.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.3
2
+ Generator: poetry-core 2.2.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any