Skip to content

Commit

Permalink
python3
Browse files Browse the repository at this point in the history
  • Loading branch information
sfomel committed Dec 12, 2024
1 parent 0130be5 commit 1a21581
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 2 deletions.
73 changes: 73 additions & 0 deletions admin/docker/4.0-dev-tex/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# pull ubuntu 18.04 from Docker repo
FROM ubuntu:18.04

MAINTAINER "Zhicheng Geng <[email protected]>"

# install packages for madagascar
RUN apt-get update && apt-get install -y \
git \
python2.7 \
python-pip \
openssh-client \
tar \
gzip \
wget \
vim \
emacs \
make \
man \
&& apt-get install -y \
libblas-dev \
liblapack-dev \
swig \
libxaw7-dev \
freeglut3-dev \
libnetpbm10-dev \
libtiff5-dev \
libgd-dev \
libplplot-dev \
libavcodec-dev \
libcairo2-dev \
libjpeg-dev \
libopenmpi-dev \
libfftw3-dev \
libsuitesparse-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# install python packages
RUN pip install numpy scipy

# get code from github
RUN git clone https://github.com/ahay/src.git $HOME/RSFSRC

# set environment variable for installing madagascar
ENV RSFROOT /root/RSFROOT

# install madagascar
RUN cd ~/RSFSRC \
&& ./configure \
&& make install

# install latex
RUN apt-get update && apt-get install -y \
texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-bibtex-extra \
texlive-lang-english \
texlive-generic-extra \
biber \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

# install segtex
RUN git clone https://github.com/SEGTeX/texmf $HOME/texmf \
&& texhash

RUN echo 'export RSFROOT="$HOME/RSFROOT"' >> $HOME/.bashrc \
&& echo 'source $RSFROOT/share/madagascar/etc/env.sh' >> $HOME/.bashrc

WORKDIR /root

CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion api/python/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if env.get('SWIG') and env.get('NUMPY'):
import numpy
numpy_loc = os.path.split(numpy.__file__)[0]
pythinc.append(os.path.join(numpy_loc,'numarray','numpy'))
if int(numpy.__version.split(".")[0]) >=2:
if int(numpy.__version__.split(".")[0]) >=2:
pythinc.append(os.path.join(numpy_loc,'_core','include'))
else:
pythinc.append(os.path.join(numpy_loc,'core','include'))
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ if test "$scons" = "no"; then
dir=`ls -d [Ss][Cc]ons-4.* | grep '[^mz]$'`
cd $dir
export PYTHONUSERBASE="$root"
$python -m pip install . --user --no-warn-script-location > /dev/null
$python -m pip install . --user --no-warn-script-location --break-system-packages > /dev/null
else
# if python version <3
archive=`ls [Ss][Cc]ons-3.*.tar.gz`
Expand Down

0 comments on commit 1a21581

Please sign in to comment.