-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix-release-tooling' into 'main'
Ensure CLI versions are set correctly for RPM packages See merge request nvidia/container-toolkit/container-toolkit!211
- Loading branch information
Showing
12 changed files
with
124 additions
and
21 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
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
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
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
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
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
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
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,34 @@ | ||
ARG BASEIMAGE=fedora:35 | ||
FROM ${BASEIMAGE} | ||
|
||
RUN yum install -y \ | ||
yum-utils \ | ||
ruby-devel \ | ||
gcc \ | ||
make \ | ||
rpm-build \ | ||
rubygems \ | ||
createrepo | ||
|
||
RUN gem install --no-document fpm | ||
|
||
# We create and install a dummy docker package since these dependencies are out of | ||
# scope for the tests performed here. | ||
RUN fpm -s empty \ | ||
-t rpm \ | ||
--description "A dummy package for docker-ce_18.06.3.ce-3.el7" \ | ||
-n docker-ce --version 18.06.3.ce-3.el7 \ | ||
-p /tmp/docker.rpm \ | ||
&& \ | ||
yum localinstall -y /tmp/docker.rpm \ | ||
&& \ | ||
rm -f /tmp/docker.rpm | ||
|
||
|
||
RUN curl -s -L https://nvidia.github.io/libnvidia-container/fedora35/nvidia-container-toolkit.repo \ | ||
| tee /etc/yum.repos.d/nvidia-container-toolkit.repo | ||
|
||
COPY entrypoint.sh / | ||
COPY install_repo.sh / | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] |
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,42 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# 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. | ||
|
||
# This script is used to build the packages for the components of the NVIDIA | ||
# Container Stack. These include the nvidia-container-toolkit in this repository | ||
# as well as the components included in the third_party folder. | ||
# All required packages are generated in the specified dist folder. | ||
|
||
: ${LOCAL_REPO_DIRECTORY:=/local-repository} | ||
if [[ -d ${LOCAL_REPO_DIRECTORY} ]]; then | ||
echo "Setting up local-repository" | ||
createrepo /local-repository | ||
|
||
cat >/etc/yum.repos.d/local.repo <<EOL | ||
[local-repository] | ||
name=NVIDIA Container Toolkit Local Packages | ||
baseurl=file:///local-repository | ||
enabled=0 | ||
gpgcheck=0 | ||
protect=1 | ||
EOL | ||
yum-config-manager --enable local-repository | ||
elif [[ -n ${TEST_REPO} ]]; then | ||
./install_repo.sh ${TEST_REPO} | ||
else | ||
echo "Skipping repo setup" | ||
fi | ||
|
||
exec bash $@ |
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,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# 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. | ||
|
||
# This script is used to build the packages for the components of the NVIDIA | ||
# Container Stack. These include the nvidia-container-toolkit in this repository | ||
# as well as the components included in the third_party folder. | ||
# All required packages are generated in the specified dist folder. | ||
|
||
test_repo=$1 | ||
echo "Setting up TEST repo: ${test_repo}" | ||
sed -i -e "s#nvidia\.github\.io/libnvidia-container#${test_repo}/libnvidia-container#g" /etc/yum.repos.d/nvidia-container-toolkit.repo | ||
yum-config-manager --enable libnvidia-container-experimental |
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
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