Skip to content

Commit

Permalink
updating dockerfile to test action branch
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Dec 31, 2021
1 parent 528d625 commit 4a1da57
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 2 deletions.
78 changes: 77 additions & 1 deletion action/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,79 @@
FROM ghcr.io/syspack/paks-ubuntu-18.04:latest
FROM ubuntu:18.04

# docker build -f Dockerfile.ubuntu-18.04 -t ghcr.io/syspack/paks-ubuntu-18.04 .

ARG DEBIAN_FRONTEND=noninteractive
ARG GITHUB_BRANCH=add/action
ENV GITHUB_BRANCH=$GITHUB_BRANCH
ENV TZ=America/Los_Angeles

RUN apt update -y \
&& apt install -y \
autoconf \
automake \
build-essential \
bzip2 \
clang \
cpio \
curl \
file \
findutils \
g++ \
gcc \
gettext \
gfortran \
git \
gpg \
iputils-ping \
jq \
libffi-dev \
libssl-dev \
libtool \
libxml2-dev \
locales \
locate \
m4 \
make \
mercurial \
ncurses-dev \
patch \
patchelf \
pciutils \
python3-pip \
rsync \
unzip \
wget \
xz-utils \
zlib1g-dev \
&& locale-gen en_US.UTF-8 \
&& apt autoremove --purge \
&& apt clean \
&& ln -s /usr/bin/gpg /usr/bin/gpg2

RUN python3 -m pip install --upgrade pip setuptools wheel \
&& python3 -m pip install gnureadline boto3 pyyaml pytz minio requests clingo \
&& rm -rf ~/.cache

# Build all software with debug flags!
ENV SPACK_ADD_DEBUG_FLAGS=true

# Install spack to put on path
RUN git clone https://github.com/spack/spack /opt/spack && \
/opt/spack/bin/spack compiler find

ENV PATH=/opt/spack/bin:$PATH \
NVIDIA_VISIBLE_DEVICES=all \
NVIDIA_DRIVER_CAPABILITIES=compute,utility \
LANGUAGE=en_US:en \
LANG=en_US.UTF-8

# Install latest version of Paks
RUN git clone -b ${GITHUB_BRANCH} https://github.com/syspack/paks /opt/paks && \
cd /opt/paks && \
python3 -m pip install .

ENV SPACK_ROOT=/opt/spack

CMD ["/bin/bash"]
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
7 changes: 6 additions & 1 deletion paks/oras.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ def fetch(self, url, save_file):
"""
# We don't have programmatic access to list, so we just try to pull
logger.info("Fetching oras {0}".format(url))
self.oras("pull", url, "-a", "--output", os.path.dirname(save_file))

try:
self.oras("pull", url, "-a", "--output", os.path.dirname(save_file))
except:
logger.info("{0} is not available for pull.".format(url))
return

# Return the file if exists
if os.path.exists(save_file):
Expand Down

0 comments on commit 4a1da57

Please sign in to comment.