Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/docker-openstudio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ concurrency:
env:
USE_TESTING_TIMEOUTS: "true"
OPENSTUDIO_VERSION: 3.11.0
OPENSTUDIO_SHA: c7f13ad615
OPENSTUDIO_VERSION_EXT: "-alpha"
OPENSTUDIO_DOWNLOAD_URL: "https://openstudio-ci-builds.s3-us-west-2.amazonaws.com/develop/OpenStudio-3.11.0-alpha%2Bc7f13ad615-Ubuntu-22.04-x86_64.deb"
OPENSTUDIO_SHA: dee62bf9dd
OPENSTUDIO_VERSION_EXT: "-rc1"
OPENSTUDIO_DOWNLOAD_URL: "https://openstudio-ci-builds.s3-us-west-2.amazonaws.com/develop/OpenStudio-3.11.0-rc1%2Bdee62bf9dd-Ubuntu-22.04-x86_64.deb"

permissions:
contents: read
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11.x'
python-version: '3.12.x'

- name: test and build
shell: bash
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11.x'
python-version: '3.12.x'

- name: install apptainer
shell: bash
Expand Down
58 changes: 29 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM ubuntu:22.04 AS base

MAINTAINER Nicholas Long nicholas.long@nrel.gov
LABEL maintainer="Nicholas Long nicholas.long@nrel.gov"

# Set the version of OpenStudio when building the container. For example `docker build --build-arg
ARG OPENSTUDIO_VERSION=3.10.0
ARG OPENSTUDIO_VERSION_EXT="-alpha"
ARG OPENSTUDIO_SHA=""
ARG OPENSTUDIO_VERSION=3.11.0
ARG OPENSTUDIO_VERSION_EXT="-rc1"
ARG OPENSTUDIO_SHA="dee62bf9dd"
# If OPENSTUDIO_DOWNLOAD_URL is not provided, construct a reasonable default using the
# OpenStudio CI S3 pattern. Users can override by passing --build-arg OPENSTUDIO_DOWNLOAD_URL=...
ARG OPENSTUDIO_DOWNLOAD_URL=""
Expand All @@ -20,27 +20,27 @@ ENV BUNDLE_WITHOUT=native_ext
# install locales and set to en_US.UTF-8. This is needed for running the CLI on some machines
# such as singularity.
RUN apt-get update && apt-get install -y \
curl \
gdebi-core \
libsqlite3-dev \
libssl-dev \
libffi-dev \
build-essential \
zlib1g-dev \
vim \
git \
locales \
sudo \
&& if [ -z "${OPENSTUDIO_DOWNLOAD_URL}" ]; then \
ESC_VERSION=$(echo "${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}" | sed 's/+/%2B/g'); \
if [ -n "${OPENSTUDIO_SHA}" ]; then \
OPENSTUDIO_DOWNLOAD_URL="https://openstudio-ci-builds.s3.amazonaws.com/develop/OpenStudio-${ESC_VERSION}%2B${OPENSTUDIO_SHA}-Ubuntu-22.04-x86_64.deb"; \
else \
OPENSTUDIO_DOWNLOAD_URL="https://openstudio-ci-builds.s3.amazonaws.com/develop/OpenStudio-${ESC_VERSION}-Ubuntu-22.04-x86_64.deb"; \
fi; \
fi \
&& echo "OpenStudio Package Download URL is ${OPENSTUDIO_DOWNLOAD_URL}" \
&& curl -SLO "$OPENSTUDIO_DOWNLOAD_URL" \
curl \
gdebi-core \
libsqlite3-dev \
libssl-dev \
libffi-dev \
build-essential \
zlib1g-dev \
vim \
git \
locales \
sudo \
&& if [ -z "${OPENSTUDIO_DOWNLOAD_URL}" ]; then \
ESC_VERSION=$(echo "${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}" | sed 's/+/%2B/g'); \
if [ -n "${OPENSTUDIO_SHA}" ]; then \
OPENSTUDIO_DOWNLOAD_URL="https://openstudio-ci-builds.s3.amazonaws.com/develop/OpenStudio-${ESC_VERSION}%2B${OPENSTUDIO_SHA}-Ubuntu-22.04-x86_64.deb"; \
else \
OPENSTUDIO_DOWNLOAD_URL="https://openstudio-ci-builds.s3.amazonaws.com/develop/OpenStudio-${ESC_VERSION}-Ubuntu-22.04-x86_64.deb"; \
fi; \
fi \
&& echo "OpenStudio Package Download URL is ${OPENSTUDIO_DOWNLOAD_URL}" \
&& curl -SLO "$OPENSTUDIO_DOWNLOAD_URL" \
&& OPENSTUDIO_DOWNLOAD_FILENAME=$(ls *.deb) \
# Verify that the download was successful (not access denied XML from s3)
&& grep -v -q "<Code>AccessDenied</Code>" ${OPENSTUDIO_DOWNLOAD_FILENAME} \
Expand Down Expand Up @@ -69,10 +69,10 @@ RUN echo "Searching for OpenStudio installation..." \
&& ls -la /usr \
&& OPENSTUDIO_FOLDER=$(find /usr -maxdepth 2 -type d -name "openstudio-${OPENSTUDIO_VERSION}*" 2>/dev/null | head -1) \
&& if [ -z "$OPENSTUDIO_FOLDER" ]; then \
echo "ERROR: OpenStudio folder not found matching pattern openstudio-${OPENSTUDIO_VERSION}*"; \
echo "Searching for any openstudio folder..."; \
find /usr -maxdepth 2 -type d -name "openstudio-*" 2>/dev/null; \
exit 1; \
echo "ERROR: OpenStudio folder not found matching pattern openstudio-${OPENSTUDIO_VERSION}*"; \
echo "Searching for any openstudio folder..."; \
find /usr -maxdepth 2 -type d -name "openstudio-*" 2>/dev/null; \
exit 1; \
fi \
&& echo "OpenStudio folder is ${OPENSTUDIO_FOLDER}" \
&& ls -la ${OPENSTUDIO_FOLDER} \
Expand Down