Skip to content

Commit

Permalink
update to use watcloud-slurm-ci user
Browse files Browse the repository at this point in the history
  • Loading branch information
alexboden committed Nov 12, 2024
1 parent 4bc930d commit 32fe044
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ COPY main.py config.py runner_size_config.py RunningJob.py allocate-ephemeral-ru
# Install Python requirements
COPY requirements.txt /home/watcloud-slurm-ci/
RUN pip3 install -r requirements.txt
RUN chmod +x start.sh
RUN chmod +x *.sh

# Run the Python script
# Note the env variable GITHUB_ACCESS_TOKEN will need to be set in order to authenticate with the GitHub API
ENTRYPOINT ["/home/watcloud-slurm-ci/start.sh"]
# ENTRYPOINT ["python3", "/app/main.py"]
# Create watcloud-slurm-ci user with UID 1814 within the container
RUN useradd -u 1814 -m -d /home/watcloud-slurm-ci watcloud-slurm-ci
RUN chown -R watcloud-slurm-ci:watcloud-slurm-ci /home/watcloud-slurm-ci/

# Custom user for running the CI
# USER watcloud-slurm-ci
# Run the Python script
# Note the env variable GITHUB_ACCESS_TOKEN will need to be set
ENTRYPOINT ["/home/watcloud-slurm-ci/start.sh"]
4 changes: 2 additions & 2 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ done

echo "Munge socket is ready. Starting Python script."

# Start the Python script
python3 /home/watcloud-slurm-ci/main.py
# Start the Python script as the watcloud-slurm-ci user
su -s /bin/bash -c "python3 /home/watcloud-slurm-ci/main.py" watcloud-slurm-ci

0 comments on commit 32fe044

Please sign in to comment.