Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Update setup-Linux-debian-10.sh (#1069)
Browse files Browse the repository at this point in the history
* fix make install causes pyhton validation error fix #1056
* fix missing  when using --parallel option #1044
* update python3.9.6 and necessary packages
* update mono installation
* fix numpy and matrix version not the latest version issue. #1045
* repair test_matrix_random,#assert  == '1.22.0'
* remove test Dockerfile'
* temporary Dockerfile. one validation error : ERROR    [2000-01-01 00:00:00 EST] : on_exit 0 'test  == CURRENT' command failed (return code 2)
* fix test_violation_record.glm. sh: 1: test: CURRENT: unexpected operatordone)...; I should try on centos to check if this test valid
* update
* add test Dockerfile
* add temporary test Dockerfile for debian
* updat python3.9.6 installation
* update build toos for gridlabd
* try the final test
* update installation dependencies
* remove merge confic
* add test Dockerfile of debian 10
* final test and validation pass. remove Dockerfile
* Remove deltamode failure tests
* Remove more unneeded deltamode error tests

Co-authored-by: JimmyLeu76 <jimmyleu@slac.stanford.edu>
Co-authored-by: David P. Chassin <david.chassin@me.com>
  • Loading branch information
3 people authored Jan 9, 2022
1 parent e860c93 commit 64953eb
Show file tree
Hide file tree
Showing 22 changed files with 95 additions and 39,509 deletions.
58 changes: 58 additions & 0 deletions Dockerfile_centos8
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
FROM centos:8
# Install needed system tools
# RUN yum clean all
# RUN yum groupinstall "Development Tools" -y
# RUN yum install cmake -y
# RUN yum install ncurses-devel -y
# RUN yum install epel-release -y
# RUN yum install curl-devel -y
# RUN yum install which -y
# RUN yum install svn -y





# RUN yum install 'dnf-command(config-manager)' -y

# #RUN yum config-manager --set-enabled PowerTools # error
# #RUN yum install armadillo-devel -y #error

# # change directory
# WORKDIR "/usr/local/src"
# RUN yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel xz-devel -y

# # Install python 3.9.6
# RUN curl https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz > Python-3.9.6.tgz
# RUN tar xzf Python-3.9.6.tgz
# WORKDIR "/usr/local/src/Python-3.9.6"
# RUN ./configure --prefix=/usr/local --enable-optimizations --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions CFLAGS="-fPIC"
# RUN make -j 10
# RUN make altinstall
# RUN /sbin/ldconfig /usr/local/lib
# RUN ln -sf /usr/local/bin/python3.9 /usr/local/bin/python3
# RUN ln -sf /usr/local/bin/python3.9-config /usr/local/bin/python3-config
# RUN ln -sf /usr/local/bin/pydoc3.9 /usr/local/bin/pydoc
# RUN ln -sf /usr/local/bin/idle3.9 /usr/local/bin/idle
# RUN ln -sf /usr/local/bin/pip3.9 /usr/local/bin/pip3
# RUN pip3 install --upgrade pip

# RUN /usr/local/bin/python3 -m pip install matplotlib Pillow pandas numpy networkx pytz pysolar PyGithub scikit-learn xlrd boto3
# RUN /usr/local/bin/python3 -m pip install IPython censusdata
# # mac m1
# RUN /usr/local/bin/python3 -m pip install shapely
# WORKDIR /usr/local/src
# RUN rm -f Python-3.9.6.tgz

# RUN export PYTHONPATH="."
# RUN export PATH=/usr/local/bin:$PATH
# RUN export MAKEFLAGS=-j20
# RUN export PYTHONSETUPFLAGS="-j 20"
# clone gridlabd
WORKDIR /usr/local/src
RUN git clone -b develop-fix-debian10-setup https://github.com/slacgismo/gridlabd

WORKDIR "/usr/local/src/gridlabd"
# COPY ./module/powerflow/autotest/test_violation_record.glm ./module/powerflow/autotest/test_violation_record.glm
RUN autoreconf -isf && ./configure
RUN make -j6 system
55 changes: 36 additions & 19 deletions build-aux/setup-Linux-debian-10.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,11 @@
apt-get -q update
apt-get -q install tzdata -y

# install python 3.7
apt-get -q install software-properties-common -y
apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curl -y
cd /tmp
curl -O https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
tar -xf Python-3.7.3.tar.xz
cd Python-3.7.3
./configure --enable-optimizations --enable-shared CXXFLAGS="-fPIC"
make -j10 altinstall
cd /usr/local/bin
ln -s python3.7 python3
ln -s python3.7m-config python3-config
ln -s pip3.7 pip3

# install python libraries by validation
pip3 -q install --upgrade pip
pip -q install pandas matplotlib mysql-client Pillow

# install system build tools needed by gridlabd

apt-get -q install git -y
apt-get -q install unzip -y
apt-get -q install autoconf -y
Expand All @@ -33,8 +19,38 @@ apt-get -q install cmake -y
apt-get -q install flex -y
apt-get -q install bison -y
apt-get -q install libcurl4-gnutls-dev -y
apt-get -q install libncurses5-dev -y
apt-get -q install subversion -y
apt-get -q install util-linux -y
apt-get install liblzma-dev -y
apt-get install libbz2-dev -y
apt-get install libncursesw5-dev -y
apt-get install xz-utils -y

# Install python 3.9.6
# python3 support needed as of 4.2
if [ ! -x /usr/local/bin/python3 -o "$(/usr/local/bin/python3 --version)" != "Python 3.9.6" ]; then
echo "install python 3.9.6"
cd /usr/local/src

curl https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz | tar xz
# tar xzf Python-3.9.6.tgz
cd Python-3.9.6

./configure --prefix=/usr/local --enable-optimizations --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions CFLAGS="-fPIC"

make -j $(nproc)
make altinstall
/sbin/ldconfig /usr/local/lib
ln -sf /usr/local/bin/python3.9 /usr/local/bin/python3
ln -sf /usr/local/bin/python3.9-config /usr/local/bin/python3-config
ln -sf /usr/local/bin/pydoc3.9 /usr/local/bin/pydoc
ln -sf /usr/local/bin/idle3.9 /usr/local/bin/idle
ln -sf /usr/local/bin/pip3.9 /usr/local/bin/pip3
/usr/local/bin/python3 -m pip install matplotlib Pillow pandas numpy networkx pytz pysolar PyGithub scikit-learn xlrd boto3
/usr/local/bin/python3 -m pip install IPython censusdata
fi



# doxgygen
apt-get -q install gawk -y
Expand All @@ -51,12 +67,13 @@ if [ ! -x /usr/bin/doxygen ]; then
make install
fi

# mono
apt-get -q install curl -y
# # mono

if [ ! -f /usr/bin/mono ]; then
cd /tmp
apt install apt-transport-https dirmngr gnupg ca-certificates -y
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu wheezy/snapshots/4.8.0 main" | tee /etc/apt/sources.list.d/mono-official.list
echo "deb https://download.mono-project.com/repo/debian stable-bustergrid main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
apt-get -q update -y
apt-get -q install mono-devel -y
fi
Expand Down
Loading

0 comments on commit 64953eb

Please sign in to comment.