Skip to content

Conversation

@becker63
Copy link

@becker63 becker63 commented Oct 5, 2025

This implements issue #3

I also restructured our Dockerfile to cache a little better while I was in the process of learning pip wheels/lmod.

Comment on lines +4 to +7

script:
native:
- "--ntasks=1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't have any affect on the localhost adapter.

Comment on lines +11 to +20
# Write connection.yml so OOD can display the session
(
umask 077
cat > connection.yml << EOL
---
host: "${host}"
port: "${port}"
password: "${password}"
EOL
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done automatically by our wrapper scripts. Did it not work for you automatically?

Comment on lines +59 to +65

if [ -f /usr/share/lmod/lmod/init/bash ]; then
source /usr/share/lmod/lmod/init/bash
fi

module purge
module use /opt/modulefiles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of the source and module use commands, we probably need to add something to /etc/profile.d from lmod.

Comment on lines +8 to +10
batch_connect:
basic:
module_file_dir: "/etc/ood/config/modules"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not have any affect.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try not to add unnecessary file modifications like the ones in this file.

Comment on lines +60 to +66
RUN bash -lc 'module use /opt/modulefiles && \
tmp=$(mktemp) && \
$LMOD_DIR/spider -o spider-json "$MODULEPATH" > "$tmp" && \
mkdir -p /etc/ood/config/modules && \
mv "$tmp" /etc/ood/config/modules/localhost.json && \
chmod 644 /etc/ood/config/modules/localhost.json && \
chmod 755 /etc/ood/config/modules'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just write directly into /etc/ood/config/modules/localhost.json?

@becker63
Copy link
Author

becker63 commented Oct 6, 2025

I got too excited to submit my first pr that I left a lot of dangling experiments and fiddling. Like the mktemp which was originally written to not clutter up my desktops working dir when I downloaded lmod on my machine. Or after.sh.erb etc. Ill clean this up today.

@johrstrom
Copy link
Contributor

Ill clean this up today.

OK, cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants