-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shift a couple of stages from Jenkinsfile into Dockerfile
The Jenkins job on our new deployment is running Docker containers with the option `-u 1000:1000` instead of `-u 0:0` which results in permissions issues when doing administrative things such as using `apt-get` to install stuff. So this commit moves the install stages of the test run into a Dockerfile, so that the image which is all nicely configured can then be used to run the tests. Relates to NGC-1447.
- Loading branch information
1 parent
1d88c3f
commit 0736d98
Showing
2 changed files
with
39 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# syntax = docker/dockerfile:1 | ||
|
||
################################################################################ | ||
# Copyright (c) 2024, National Research Foundation (SARAO) | ||
# | ||
# Licensed under the BSD 3-Clause License (the "License"); you may not use | ||
# this file except in compliance with the License. You may obtain a copy | ||
# of the License at | ||
# | ||
# https://opensource.org/licenses/BSD-3-Clause | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
################################################################################ | ||
|
||
FROM ubuntu:24.04 | ||
|
||
COPY . . | ||
|
||
# Install dependencies | ||
# jq and iproute2 are used to find the interface IPv4 address | ||
RUN apt-get update && apt-get -y --no-install-recommends install libpython3-dev python3-venv jq iproute2 | ||
RUN python3 -m venv /venv | ||
RUN .ci/install-sys-pkgs.sh | ||
RUN PATH="/venv/bin:$PATH" .ci/py-requirements.sh | ||
|
||
# Install Python package | ||
RUN PATH="/venv/bin:$PATH" pip install -v \ | ||
--config-settings=setup-args=--native-file=ci.ini \ | ||
--config-settings=setup-args=-Dibv=enabled \ | ||
--config-settings=setup-args=-Dibv_hw_rate_limit=enabled \ | ||
--config-settings=setup-args=-Dmlx5dv=enabled \ | ||
. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters