Spaces:
Build error
Build error
jordancaraballo
commited on
Commit
·
f74bad2
1
Parent(s):
b94f997
Testing dockerfile for baselibs
Browse files- .github/ISSUE_TEMPLATE/bug_report.md +38 -0
- .github/ISSUE_TEMPLATE/custom.md +10 -0
- .github/ISSUE_TEMPLATE/feature_request.md +20 -0
- .github/workflows/ci.yml +37 -0
- .github/workflows/codeql-analysis.yml +74 -0
- .github/workflows/dockerhub.yml +43 -0
- .github/workflows/lint.yml +18 -0
- .github/workflows/pypi-publish.yml +31 -0
- requirements/Dockerfile.baselibs +202 -0
.github/ISSUE_TEMPLATE/bug_report.md
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
name: Bug report
|
3 |
+
about: Create a report to help us improve
|
4 |
+
title: ''
|
5 |
+
labels: ''
|
6 |
+
assignees: ''
|
7 |
+
|
8 |
+
---
|
9 |
+
|
10 |
+
**Describe the bug**
|
11 |
+
A clear and concise description of what the bug is.
|
12 |
+
|
13 |
+
**To Reproduce**
|
14 |
+
Steps to reproduce the behavior:
|
15 |
+
1. Go to '...'
|
16 |
+
2. Click on '....'
|
17 |
+
3. Scroll down to '....'
|
18 |
+
4. See error
|
19 |
+
|
20 |
+
**Expected behavior**
|
21 |
+
A clear and concise description of what you expected to happen.
|
22 |
+
|
23 |
+
**Screenshots**
|
24 |
+
If applicable, add screenshots to help explain your problem.
|
25 |
+
|
26 |
+
**Desktop (please complete the following information):**
|
27 |
+
- OS: [e.g. iOS]
|
28 |
+
- Browser [e.g. chrome, safari]
|
29 |
+
- Version [e.g. 22]
|
30 |
+
|
31 |
+
**Smartphone (please complete the following information):**
|
32 |
+
- Device: [e.g. iPhone6]
|
33 |
+
- OS: [e.g. iOS8.1]
|
34 |
+
- Browser [e.g. stock browser, safari]
|
35 |
+
- Version [e.g. 22]
|
36 |
+
|
37 |
+
**Additional context**
|
38 |
+
Add any other context about the problem here.
|
.github/ISSUE_TEMPLATE/custom.md
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
name: Custom issue template
|
3 |
+
about: Describe this issue template's purpose here.
|
4 |
+
title: ''
|
5 |
+
labels: ''
|
6 |
+
assignees: ''
|
7 |
+
|
8 |
+
---
|
9 |
+
|
10 |
+
|
.github/ISSUE_TEMPLATE/feature_request.md
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
name: Feature request
|
3 |
+
about: Suggest an idea for this project
|
4 |
+
title: ''
|
5 |
+
labels: ''
|
6 |
+
assignees: ''
|
7 |
+
|
8 |
+
---
|
9 |
+
|
10 |
+
**Is your feature request related to a problem? Please describe.**
|
11 |
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12 |
+
|
13 |
+
**Describe the solution you'd like**
|
14 |
+
A clear and concise description of what you want to happen.
|
15 |
+
|
16 |
+
**Describe alternatives you've considered**
|
17 |
+
A clear and concise description of any alternative solutions or features you've considered.
|
18 |
+
|
19 |
+
**Additional context**
|
20 |
+
Add any other context or screenshots about the feature request here.
|
.github/workflows/ci.yml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: CI Regression
|
2 |
+
|
3 |
+
on: [push, pull_request]
|
4 |
+
|
5 |
+
jobs:
|
6 |
+
|
7 |
+
test:
|
8 |
+
runs-on: ubuntu-latest
|
9 |
+
strategy:
|
10 |
+
max-parallel: 4
|
11 |
+
matrix:
|
12 |
+
# 3.6 will reach EoL in December 2021
|
13 |
+
# https://devguide.python.org/#status-of-python-branches
|
14 |
+
python-version: [ "3.8", "3.9" ]
|
15 |
+
steps:
|
16 |
+
- uses: actions/checkout@v2
|
17 |
+
- name: Setup python
|
18 |
+
uses: actions/setup-python@v2
|
19 |
+
with:
|
20 |
+
python-version: ${{ matrix.python-version }}
|
21 |
+
architecture: x64
|
22 |
+
- name: Install test dependencies
|
23 |
+
run: |
|
24 |
+
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
|
25 |
+
sudo apt-get update
|
26 |
+
sudo apt-get install -y gdal-bin libgdal-dev build-essential
|
27 |
+
python -m pip install --upgrade pip
|
28 |
+
pip install https://github.com/rasterio/rasterio/archive/master.zip
|
29 |
+
pip install .[test]
|
30 |
+
pip install coveralls
|
31 |
+
- name: Run tests
|
32 |
+
run: coverage run -m pytest -v
|
33 |
+
- name: Submit coveralls
|
34 |
+
if: github.event_name != 'pull_request'
|
35 |
+
run: coveralls --service=github
|
36 |
+
env:
|
37 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
.github/workflows/codeql-analysis.yml
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# For most projects, this workflow file will not need changing; you simply need
|
2 |
+
# to commit it to your repository.
|
3 |
+
#
|
4 |
+
# You may wish to alter this file to override the set of languages analyzed,
|
5 |
+
# or to provide custom queries or build logic.
|
6 |
+
#
|
7 |
+
# ******** NOTE ********
|
8 |
+
# We have attempted to detect the languages in your repository. Please check
|
9 |
+
# the `language` matrix defined below to confirm you have the correct set of
|
10 |
+
# supported CodeQL languages.
|
11 |
+
#
|
12 |
+
name: "CodeQL"
|
13 |
+
|
14 |
+
on:
|
15 |
+
push:
|
16 |
+
branches: [ "main" ]
|
17 |
+
pull_request:
|
18 |
+
# The branches below must be a subset of the branches above
|
19 |
+
branches: [ "main" ]
|
20 |
+
schedule:
|
21 |
+
- cron: '29 15 * * 2'
|
22 |
+
|
23 |
+
jobs:
|
24 |
+
analyze:
|
25 |
+
name: Analyze
|
26 |
+
runs-on: ubuntu-latest
|
27 |
+
permissions:
|
28 |
+
actions: read
|
29 |
+
contents: read
|
30 |
+
security-events: write
|
31 |
+
|
32 |
+
strategy:
|
33 |
+
fail-fast: false
|
34 |
+
matrix:
|
35 |
+
language: [ 'python' ]
|
36 |
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
37 |
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
38 |
+
|
39 |
+
steps:
|
40 |
+
- name: Checkout repository
|
41 |
+
uses: actions/checkout@v3
|
42 |
+
|
43 |
+
# Initializes the CodeQL tools for scanning.
|
44 |
+
- name: Initialize CodeQL
|
45 |
+
uses: github/codeql-action/init@v2
|
46 |
+
with:
|
47 |
+
languages: ${{ matrix.language }}
|
48 |
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
49 |
+
# By default, queries listed here will override any specified in a config file.
|
50 |
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
51 |
+
|
52 |
+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
53 |
+
# queries: security-extended,security-and-quality
|
54 |
+
|
55 |
+
|
56 |
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
57 |
+
# If this step fails, then you should remove it and run the build manually (see below)
|
58 |
+
- name: Autobuild
|
59 |
+
uses: github/codeql-action/autobuild@v2
|
60 |
+
|
61 |
+
# ℹ️ Command-line programs to run using the OS shell.
|
62 |
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
63 |
+
|
64 |
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
65 |
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
66 |
+
|
67 |
+
# - run: |
|
68 |
+
# echo "Run, Build Application using script"
|
69 |
+
# ./location_of_script_within_repo/buildscript.sh
|
70 |
+
|
71 |
+
- name: Perform CodeQL Analysis
|
72 |
+
uses: github/codeql-action/analyze@v2
|
73 |
+
with:
|
74 |
+
category: "/language:${{matrix.language}}"
|
.github/workflows/dockerhub.yml
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: CI to Docker Hub Baselibs
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
schedule:
|
6 |
+
- cron: '30 5 * * 1,3'
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
docker:
|
10 |
+
runs-on: ubuntu-latest
|
11 |
+
steps:
|
12 |
+
-
|
13 |
+
name: Checkout
|
14 |
+
uses: actions/checkout@v3
|
15 |
+
-
|
16 |
+
name: Set up QEMU
|
17 |
+
uses: docker/setup-qemu-action@v2
|
18 |
+
-
|
19 |
+
name: Set up Docker Buildx
|
20 |
+
uses: docker/setup-buildx-action@v2
|
21 |
+
-
|
22 |
+
name: Login to Docker Hub
|
23 |
+
uses: docker/login-action@v2
|
24 |
+
with:
|
25 |
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
26 |
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
27 |
+
|
28 |
+
-
|
29 |
+
name: Lower github-runner storage
|
30 |
+
run: |
|
31 |
+
sudo rm -rf /usr/share/dotnet
|
32 |
+
sudo rm -rf /opt/ghc
|
33 |
+
sudo rm -rf "/usr/local/share/boost"
|
34 |
+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
35 |
+
|
36 |
+
-
|
37 |
+
name: Build and push
|
38 |
+
uses: docker/build-push-action@v4
|
39 |
+
with:
|
40 |
+
context: .
|
41 |
+
file: ./requirements/Dockerfile.baselibs
|
42 |
+
push: true
|
43 |
+
tags: nasanccs/wrf-baselibs:latest
|
.github/workflows/lint.yml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Code style - PEP8
|
2 |
+
|
3 |
+
on: [push, pull_request]
|
4 |
+
|
5 |
+
jobs:
|
6 |
+
|
7 |
+
flake8-lint:
|
8 |
+
runs-on: ubuntu-latest
|
9 |
+
name: Lint
|
10 |
+
steps:
|
11 |
+
- name: Check out source repository
|
12 |
+
uses: actions/checkout@v2
|
13 |
+
- name: Set up Python environment
|
14 |
+
uses: actions/setup-python@v2
|
15 |
+
with:
|
16 |
+
python-version: "3.8"
|
17 |
+
- name: flake8 Lint
|
18 |
+
uses: py-actions/flake8@v2
|
.github/workflows/pypi-publish.yml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Publish package
|
2 |
+
|
3 |
+
on:
|
4 |
+
release:
|
5 |
+
types: [published]
|
6 |
+
|
7 |
+
jobs:
|
8 |
+
pypi-publish:
|
9 |
+
runs-on: ubuntu-latest
|
10 |
+
|
11 |
+
steps:
|
12 |
+
- uses: actions/checkout@v2
|
13 |
+
with:
|
14 |
+
fetch-depth: 0
|
15 |
+
|
16 |
+
- name: Set up Python
|
17 |
+
uses: actions/setup-python@v2
|
18 |
+
with:
|
19 |
+
python-version: '3.x'
|
20 |
+
|
21 |
+
- name: Install build package
|
22 |
+
run: |
|
23 |
+
python -m pip install --upgrade pip
|
24 |
+
python -m pip install build --user
|
25 |
+
- name: Build distribution
|
26 |
+
run: |
|
27 |
+
python -m build --sdist --wheel --outdir dist/ .
|
28 |
+
- name: Publish to PyPI
|
29 |
+
uses: pypa/gh-action-pypi-publish@master
|
30 |
+
with:
|
31 |
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
requirements/Dockerfile.baselibs
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM rockylinux:8
|
2 |
+
MAINTAINER Jordan A Caraballo-Vega <[email protected]>
|
3 |
+
|
4 |
+
ENV NML_VERSION 4.4
|
5 |
+
ENV MPI_SHORT_VERSION 4.0
|
6 |
+
ENV MPI_VERSION 4.0.0
|
7 |
+
ENV J 4
|
8 |
+
|
9 |
+
# Set up base OS environment
|
10 |
+
RUN dnf -y update \
|
11 |
+
&& dnf install -y --setopt=tsflags=nodocs --enablerepo=powertools,epel \
|
12 |
+
gcc gcc-gfortran gcc-c++ \
|
13 |
+
glibc.i686 libgcc.i686 libpng-devel jasper jasper-devel hostname \
|
14 |
+
m4 make perl tar bash tcsh time wget which zlib zlib-devel \
|
15 |
+
openssh-clients openssh-server net-tools fontconfig libgfortran \
|
16 |
+
libXext libXrender ImageMagick ImageMagick-devel epel-release git flex \
|
17 |
+
flex-devel byacc bzip2-devel gzip-devel \
|
18 |
+
php-devel php-pear \
|
19 |
+
&& dnf -y clean all --enablerepo='*' \
|
20 |
+
&& rm -rf /var/cache/dnf
|
21 |
+
|
22 |
+
# Setting system
|
23 |
+
RUN groupadd wrf -g 9999
|
24 |
+
RUN useradd -u 9999 -g wrf -G wheel -M -d /wrf wrfuser
|
25 |
+
RUN mkdir /wrf \
|
26 |
+
&& chown -R wrfuser:wrf /wrf \
|
27 |
+
&& chmod 6755 /wrf
|
28 |
+
|
29 |
+
# Build OpenMPI
|
30 |
+
RUN mkdir -p /wrf/libs/openmpi/BUILD_DIR
|
31 |
+
RUN cd /wrf/libs/openmpi/BUILD_DIR \
|
32 |
+
&& curl -L -O https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.0.tar.gz \
|
33 |
+
&& tar -xf openmpi-4.0.0.tar.gz \
|
34 |
+
&& cd openmpi-4.0.0 \
|
35 |
+
&& ./configure --prefix=/usr/local &> /wrf/libs/build_log_openmpi_config \
|
36 |
+
&& echo dummy printout to keep travis happy openmpi config \
|
37 |
+
&& make all install \
|
38 |
+
&& echo "make all install | awk 'NR % 1000 == 0'" \
|
39 |
+
&& echo "make all install &> /wrf/libs/build_log_openmpi_make" \
|
40 |
+
&& echo dummy printout to keep travis happy openmpi make \
|
41 |
+
&& cd / \
|
42 |
+
&& rm -rf /wrf/libs/openmpi/BUILD_DIR
|
43 |
+
|
44 |
+
# Set up base OS environment
|
45 |
+
|
46 |
+
#RUN yum -y update
|
47 |
+
# Install SCL release package and python SCL
|
48 |
+
#RUN yum -y install centos-release-scl \
|
49 |
+
# && yum -y install --setopt=tsflags=nodocs rh-python38
|
50 |
+
# Enable rh-python scl binary
|
51 |
+
#COPY entrypoint.sh /usr/bin/entrypoint.sh
|
52 |
+
#RUN chmod +x /usr/bin/entrypoint.sh
|
53 |
+
#ENTRYPOINT [ "/usr/bin/entrypoint.sh" ]
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
# Install version 10 of GNU compiler
|
58 |
+
|
59 |
+
#RUN yum -y install centos-release-scl \
|
60 |
+
# && yum -y install devtoolset-10 \
|
61 |
+
# && yum -y install devtoolset-10-gcc devtoolset-10-gcc-gfortran devtoolset-10-gcc-c++ \
|
62 |
+
# && scl enable devtoolset-10 bash \
|
63 |
+
# && scl enable devtoolset-10 tcsh
|
64 |
+
|
65 |
+
|
66 |
+
# Build HDF5 libraries
|
67 |
+
#RUN mkdir -p /wrf/libs/hdf5/BUILD_DIR
|
68 |
+
#RUN source /opt/rh/devtoolset-10/enable \
|
69 |
+
# && cd /wrf/libs/hdf5/BUILD_DIR \
|
70 |
+
# && wget https://www2.mmm.ucar.edu/people/duda/files/mpas/sources/hdf5-1.10.5.tar.bz2 \
|
71 |
+
# && tar -xf hdf5-1.10.5.tar.bz2 \
|
72 |
+
# && cd hdf5-1.10.5 \
|
73 |
+
# && ./configure --enable-fortran --enable-cxx --enable-shared --prefix=/usr/local/ &> /wrf/libs/build_log_hdf5_config \
|
74 |
+
# && echo dummy printout to keep travis happy hdf5 config \
|
75 |
+
# && make install &> /wrf/libs/build_log_hdf5_make \
|
76 |
+
# && echo dummy printout to keep travis happy hdf5 make \
|
77 |
+
# && cd / \
|
78 |
+
# && rm -rf /wrf/libs/hdf5/BUILD_DIR
|
79 |
+
#ENV LD_LIBRARY_PATH /usr/local/lib
|
80 |
+
|
81 |
+
# Build netCDF C libraries
|
82 |
+
#RUN yum -y install libcurl-devel zlib-devel
|
83 |
+
#ENV NETCDF /wrf/libs/netcdf
|
84 |
+
#RUN mkdir -p ${NETCDF}/BUILD_DIR
|
85 |
+
#RUN source /opt/rh/devtoolset-10/enable \
|
86 |
+
# && cd ${NETCDF}/BUILD_DIR \
|
87 |
+
# && curl -L -O https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.7.4.tar.gz \
|
88 |
+
# && curl -L -O https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.6.0.tar.gz \
|
89 |
+
# && curl -L -O https://github.com/Unidata/netcdf4-python/archive/v1.5.3rel.tar.gz \
|
90 |
+
# && tar -xf v4.7.4.tar.gz \
|
91 |
+
# && cd netcdf-c-4.7.4 \
|
92 |
+
# && ./configure --enable-shared --prefix=${NETCDF} &> /wrf/libs/build_log_ncc_config \
|
93 |
+
# && echo dummy printout to keep travis happy ncc config \
|
94 |
+
# && make install &> /wrf/libs/build_log_ncc_make \
|
95 |
+
# && echo dummy printout to keep travis happy ncc make \
|
96 |
+
# && cd /
|
97 |
+
|
98 |
+
# Build netCDF Fortran libraries
|
99 |
+
#RUN source /opt/rh/devtoolset-10/enable \
|
100 |
+
# && env \
|
101 |
+
# && cd ${NETCDF}/BUILD_DIR \
|
102 |
+
# && tar -xf v4.6.0.tar.gz \
|
103 |
+
# && cd netcdf-fortran-4.6.0/ \
|
104 |
+
# && export LD_LIBRARY_PATH=${NETCDF}/lib:/usr/local/lib:${LD_LIBRARY_PATH} \
|
105 |
+
# && CPPFLAGS=-I${NETCDF}/include LDFLAGS=-L${NETCDF}/lib ./configure --enable-shared --prefix=${NETCDF} &> /wrf/libs/build_log_ncf_config \
|
106 |
+
# && echo dummy printout to keep travis happy ncf config \
|
107 |
+
# && make install &> /wrf/libs/build_log_ncf_make \
|
108 |
+
# && echo dummy printout to keep travis happy ncf make \
|
109 |
+
# && cd /
|
110 |
+
|
111 |
+
# Install and setup Python3.8
|
112 |
+
#RUN yum -y groupinstall "Development Tools"
|
113 |
+
#RUN yum -y install openssl-devel bzip2-devel libffi-devel xz-devel
|
114 |
+
#RUN mkdir -p /wrf/libs/python/BUILD_DIR \
|
115 |
+
# && cd /wrf/libs/python/BUILD_DIR \
|
116 |
+
# && wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz \
|
117 |
+
# && tar -xf Python-3.8.12.tgz \
|
118 |
+
# && cd Python-3.8.12 \
|
119 |
+
# && ./configure --enable-optimizations --prefix=/usr/local \
|
120 |
+
# && make altinstall \
|
121 |
+
# && cd / \
|
122 |
+
# && rm -rf /wrf/libs/python/BUILD_DIR
|
123 |
+
#RUN python3.8 -m pip install numpy \
|
124 |
+
# && python3.8 -m pip install --upgrade pip \
|
125 |
+
# && python3.8 -m pip install --upgrade setuptools
|
126 |
+
#RUN ldconfig -v
|
127 |
+
|
128 |
+
# Build netCDF4-python libraries
|
129 |
+
#RUN source /opt/rh/devtoolset-10/enable \
|
130 |
+
# && cd ${NETCDF}/BUILD_DIR \
|
131 |
+
# && tar -xf v1.5.3rel.tar.gz \
|
132 |
+
# && cd netcdf4-python-1.5.3rel/ \
|
133 |
+
# && export LD_LIBRARY_PATH=${NETCDF}/lib:${LD_LIBRARY_PATH} \
|
134 |
+
# && export NETCDF4_DIR=${NETCDF} \
|
135 |
+
# && export HDF5_DIR=/usr/local \
|
136 |
+
# && python3.8 -m pip install wheel \
|
137 |
+
# && python3.8 setup.py build \
|
138 |
+
# && CPPFLAGS="-I${NETCDF}/include -I/usr/local/include" LDFLAGS="-L${NETCDF}/lib -L/usr/local/lib" python3.8 setup.py install \
|
139 |
+
# && echo dummy printout to keep travis happy ncf4-python install \
|
140 |
+
# && cd / \
|
141 |
+
# && rm -rf ${NETCDF}/BUILD_DIR
|
142 |
+
|
143 |
+
#RUN mkdir -p /var/run/sshd \
|
144 |
+
# && ssh-keygen -A \
|
145 |
+
# && sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/g' /etc/ssh/sshd_config \
|
146 |
+
# && sed -i 's/#RSAAuthentication yes/RSAAuthentication yes/g' /etc/ssh/sshd_config \
|
147 |
+
# && sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/g' /etc/ssh/sshd_config
|
148 |
+
|
149 |
+
#RUN mkdir -p /wrf/WPS_GEOG /wrf/wrfinput /wrf/wrfoutput \
|
150 |
+
# && chown -R wrfuser:wrf /wrf /wrf/WPS_GEOG /wrf/wrfinput /wrf/wrfoutput /usr/local \
|
151 |
+
# && chmod 6755 /wrf /wrf/WPS_GEOG /wrf/wrfinput /wrf/wrfoutput /usr/local
|
152 |
+
|
153 |
+
# Download NCL
|
154 |
+
#RUN curl -SL https://www.earthsystemgrid.org/api/v1/dataset/ncl.662.dap/file/ncl_ncarg-6.6.2-CentOS7.6_64bit_gnu485.tar.gz | tar zxC /usr/local
|
155 |
+
#ENV NCARG_ROOT /usr/local
|
156 |
+
|
157 |
+
# Set environment for interactive container shells
|
158 |
+
#RUN echo export LDFLAGS="-lm" >> /etc/bashrc \
|
159 |
+
# && echo export NETCDF=${NETCDF} >> /etc/bashrc \
|
160 |
+
# && echo export JASPERINC=/usr/include/jasper/ >> /etc/bashrc \
|
161 |
+
# && echo export JASPERLIB=/usr/lib64/ >> /etc/bashrc \
|
162 |
+
# && echo export LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib/gcc/aarch64-redhat-linux/10:/usr/lib64/openmpi/lib:${NETCDF}/lib:${LD_LIBRARY_PATH}" >> /etc/bashrc \
|
163 |
+
# && echo export PATH=".:/opt/rh/devtoolset-10/root/usr/bin:/usr/lib64/openmpi/bin:${NETCDF}/bin:$PATH" >> /etc/bashrc \
|
164 |
+
# && echo export NCARG_ROOT=/usr/local >> /etc/bashrc
|
165 |
+
|
166 |
+
#RUN echo setenv LDFLAGS "-lm" >> /etc/csh.cshrc \
|
167 |
+
# && echo setenv NETCDF "${NETCDF}" >> /etc/csh.cshrc \
|
168 |
+
# && echo setenv JASPERINC "/usr/include/jasper/" >> /etc/csh.cshrc \
|
169 |
+
# && echo setenv JASPERLIB "/usr/lib64/" >> /etc/csh.cshrc \
|
170 |
+
# && echo setenv LD_LIBRARY_PATH "/opt/rh/devtoolset-10/root/usr/lib/gcc/aarch64-redhat-linux/10:/usr/lib64/openmpi/lib:${NETCDF}/lib:${LD_LIBRARY_PATH}" >> /etc/csh.cshrc \
|
171 |
+
# && echo setenv PATH ".:/opt/rh/devtoolset-10/root/usr/bin:/usr/lib64/openmpi/bin:${NETCDF}/bin:$PATH" >> /etc/csh.cshrc \
|
172 |
+
# && echo setenv NCARG_ROOT /usr/local >> /etc/csh.cshrc
|
173 |
+
|
174 |
+
#RUN mkdir /wrf/.ssh ; echo "StrictHostKeyChecking no" > /wrf/.ssh/config
|
175 |
+
#COPY default-mca-params.conf /wrf/.openmpi/mca-params.conf
|
176 |
+
#RUN mkdir -p /wrf/.openmpi
|
177 |
+
#RUN chown -R wrfuser:wrf /wrf/
|
178 |
+
|
179 |
+
# all root steps completed above, now below as regular userID wrfuser
|
180 |
+
#USER wrfuser
|
181 |
+
#WORKDIR /wrf
|
182 |
+
|
183 |
+
# Download data
|
184 |
+
#ARG argname=tutorial
|
185 |
+
#RUN echo DAVE $argname
|
186 |
+
#RUN if [ "$argname" = "tutorial" ] ; then curl -SL https://www2.mmm.ucar.edu/wrf/src/wps_files/geog_low_res_mandatory.tar.gz | tar -xzC /wrf/WPS_GEOG ; fi
|
187 |
+
#RUN if [ "$argname" = "tutorial" ] ; then curl -SL https://www2.mmm.ucar.edu/wrf/TUTORIAL_DATA/colorado_march16.new.tar.gz | tar -xzC /wrf/wrfinput ; fi
|
188 |
+
#RUN if [ "$argname" = "tutorial" ] ; then curl -SL https://www2.mmm.ucar.edu/wrf/src/namelists_v$NML_VERSION.tar.gz | tar -xzC /wrf/wrfinput ; fi
|
189 |
+
#RUN if [ "$argname" = "tutorial" ] ; then curl -SL https://www2.mmm.ucar.edu/wrf/TUTORIAL_DATA/WRF_NCL_scripts.tar.gz | tar -xzC /wrf ; fi
|
190 |
+
#RUN if [ "$argname" = "regtest" ] ; then curl -SL https://www2.mmm.ucar.edu/wrf/dave/data_smaller.tar.gz | tar -xzC /wrf ; fi
|
191 |
+
|
192 |
+
#ENV JASPERINC /usr/include/jasper
|
193 |
+
#ENV JASPERLIB /usr/lib64
|
194 |
+
#ENV NETCDF_classic 1
|
195 |
+
#ENV LD_LIBRARY_PATH /opt/rh/devtoolset-10/root/usr/lib/gcc/aarch64-redhat-linux/10:/usr/lib64/openmpi/lib:${NETCDF}/lib:${LD_LIBRARY_PATH}
|
196 |
+
#ENV PATH .:/opt/rh/devtoolset-10/root/usr/bin:/usr/lib64/openmpi/bin:${NETCDF}/bin:$PATH
|
197 |
+
|
198 |
+
#RUN ssh-keygen -f /wrf/.ssh/id_rsa -t rsa -N '' \
|
199 |
+
# && chmod 600 /wrf/.ssh/config \
|
200 |
+
# && chmod 700 /wrf/.ssh \
|
201 |
+
# && cp /wrf/.ssh/id_rsa.pub /wrf/.ssh/authorized_keys
|
202 |
+
#
|