chore: Merge Slurm-infrastructure support changes task_trial
One of many small changes coming to make the diff more manageable.
Keep files that are read-only in separate archives than those
that are kept per-container instance to enabble Slurm to place them
properly.
@@ -54,7 +54,9 @@ func (s TrialSpec) ToTaskSpec(keys *ssh.PrivateAndPublicKeys) TaskSpec {
trialEntrypointMode,
tar.TypeReg,
),
+ }
+ additionalSSHFiles := archive.Archive{
s.Base.AgentUserGroup.OwnedArchiveItem(sshDir, nil, sshDirMode, tar.TypeDir),
s.Base.AgentUserGroup.OwnedArchiveItem(trialAuthorizedKeysFile,
keys.PublicKey,
@@ -72,6 +74,9 @@ func (s TrialSpec) ToTaskSpec(keys *ssh.PrivateAndPublicKeys) TaskSpec {
sshdConfigMode,
tar.TypeReg,
),
+ }
+
+ additionalRootFiles := archive.Archive{
archive.RootItem(
trialSSHConfigFile,
etc.MustStaticFile(etc.SSHConfigResource),
@@ -89,6 +94,8 @@ func (s TrialSpec) ToTaskSpec(keys *ssh.PrivateAndPublicKeys) TaskSpec {
rootDir,
),
wrapArchive(additionalFiles, rootDir),
+ wrapArchive(additionalRootFiles, rootDir),
+ wrapArchive(additionalSSHFiles, rootDir),
}
res.Description = fmt.Sprintf(
