Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pulsar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NDIP
Pulsar
Commits
1922bd42
Commit
1922bd42
authored
5 years ago
by
Enis Afgan
Browse files
Options
Downloads
Patches
Plain Diff
Add Slurm to the CVMFS container
parent
407ac3d3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker/cvmfs/Dockerfile
+14
-6
14 additions, 6 deletions
docker/cvmfs/Dockerfile
docker/cvmfs/README.md
+5
-0
5 additions, 0 deletions
docker/cvmfs/README.md
docker/testing/configure_slurm.py
+10
-3
10 additions, 3 deletions
docker/testing/configure_slurm.py
with
29 additions
and
9 deletions
docker/cvmfs/Dockerfile
+
14
−
6
View file @
1922bd42
...
...
@@ -15,14 +15,17 @@ RUN apt-get update \
# Install packages
&& apt-get update \
&& apt-get install -y --no-install-recommends gcc python-setuptools \
python-dev python-pip cvmfs cvmfs-config-default \
python-dev python-pip \
cvmfs cvmfs-config-default \
slurm-llnl slurm-drmaa-dev \
# Install Pulsar Python requirements
&& pip install --no-cache-dir -r /pulsar/requirements.txt \
&& pip install --no-cache-dir -r /pulsar/requirements.txt
drmaa
\
# Remove build deps and cleanup
&& apt-get -y remove python-dev gcc wget lsb-release \
&& apt-get -y autoremove \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* /var/log/dpkg.log
&& rm -rf /var/lib/apt/lists/* /var/log/dpkg.log \
&& /usr/sbin/create-munge-key
# Create pulsar user environment
RUN
adduser
--disabled-password
--gecos
''
pulsar
\
...
...
@@ -32,10 +35,13 @@ RUN adduser --disabled-password --gecos '' pulsar \
WORKDIR
/pulsar/
# Add files to the image
ADD
. /pulsar
ADD
. /pulsar
/
# Change ownership to pulsar & configure CVMFS
RUN
python setup.py
install
\
&&
pulsar-config
--auto_conda
--host
0.0.0.0
\
&&
echo
"export DRMAA_LIBRARY_PATH=/usr/lib/slurm-drmaa/lib/libdrmaa.so"
>>
local_env.sh
\
&&
cp
docker/cvmfs/app.yml
.
\
&&
cp
./docker/testing/configure_slurm.py /usr/sbin/configure_slurm.py
\
&&
chown
-R
pulsar:pulsar /pulsar
\
&&
chmod
+x /usr/local/bin/pulsar
\
&&
cp
/pulsar/docker/cvmfs/default.local /etc/cvmfs/
\
...
...
@@ -47,5 +53,7 @@ RUN python setup.py install \
EXPOSE
8913
# Must run CVMFS setup otherwise autofs does not get configured nor automount
# starts. Then switch to less-priviledged user for running Pulsar.
CMD
/usr/bin/cvmfs_config setup; su pulsar -c "/usr/local/bin/pulsar"
# starts. Then start Slurm and switch to a less-priviledged user for Pulsar.
CMD
/usr/bin/cvmfs_config setup; service munge start; \
python /usr/sbin/configure_slurm.py; service slurmd start; \
service slurmctld start; su pulsar -c "/usr/local/bin/pulsar"
This diff is collapsed.
Click to expand it.
docker/cvmfs/README.md
0 → 100644
+
5
−
0
View file @
1922bd42
Build this image from the repo root folder using the following command:
```
docker build -f docker/cvmfs/Dockerfile -t galaxy/pulsar:dev .
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker/testing/configure_slurm.py
+
10
−
3
View file @
1922bd42
"""
This file is also being used by the GalaxyCloudRunner (gcr) Docker image.
"""
from
getpass
import
getuser
from
multiprocessing
import
cpu_count
from
socket
import
gethostname
from
string
import
Template
from
subprocess
import
call
from
getpass
import
getuser
SLURM_CONFIG_TEMPLATE
=
'''
# slurm.conf file generated by configurator.html.
...
...
@@ -75,13 +80,15 @@ SlurmctldDebug=3
#SlurmctldLogFile=
SlurmdDebug=3
#SlurmdLogFile=
NodeName=$hostname CPUs=
1
State=UNKNOWN
NodeName=$hostname CPUs=
$cpus
State=UNKNOWN
PartitionName=debug Nodes=$hostname Default=YES MaxTime=INFINITE State=UP
'''
def
main
():
template_params
=
{
"
hostname
"
:
gethostname
(),
"
user
"
:
getuser
()}
template_params
=
{
"
hostname
"
:
gethostname
(),
"
user
"
:
getuser
(),
"
cpus
"
:
cpu_count
()}
config_contents
=
Template
(
SLURM_CONFIG_TEMPLATE
).
substitute
(
template_params
)
open
(
"
/etc/slurm-llnl/slurm.conf
"
,
"
w
"
).
write
(
config_contents
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment