Skip to content

Commit

Permalink
Merge pull request #13 from EPFL-LCSB/dev
Browse files Browse the repository at this point in the history
VER: Bump to 0.7.0-b2
  • Loading branch information
psalvy committed May 2, 2018
2 parents 3faa955 + d4803c1 commit d11f322
Show file tree
Hide file tree
Showing 43 changed files with 85,688 additions and 729 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,6 +1,8 @@
# Pycharm folders
.idea/*
cobra_docker/work/.idea/*
*___jb_old___
*___jb_tmp___

###########################################
### Standard Python .gitignore ###
Expand Down
3 changes: 2 additions & 1 deletion doc/conf.py
Expand Up @@ -61,7 +61,8 @@
# The short X.Y version.
version = '0.7'
# The full version, including alpha/beta/rc tags.
release = '0.7.0-b1'

release = '0.7.0-b2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
19 changes: 9 additions & 10 deletions docker/Dockerfile
@@ -1,4 +1,4 @@
FROM python:3.5
FROM python:3.6
# Warning: cplex 12.7.1 is only compatible with python 3.5, while
# Gurobi 7.5 is only compatbile with with python 3.6. If you wan to
# install both, I recommend downgrading the gurobi version.
Expand All @@ -11,30 +11,28 @@ USER root
RUN apt-get update && apt-get install -y --no-install-recommends \
libxml2-dev \
libxslt1-dev \
less \
less \
&& rm -rf /var/lib/apt/lists/*

ENV USER pytfa
ENV HOME /home/$USER

RUN useradd -ms "/bin/bash" "$USER"
USER $USER
WORKDIR $HOME

USER root

# Copy python package requirements
COPY requirements.txt .

# Install python packages
RUN pip install -r requirements.txt

RUN useradd -ms "/bin/bash" "$USER"
USER $USER
WORKDIR $HOME

# Take care of the solvers
COPY ./solvers /solvers
COPY ./utils /utils

# Fix permissions
RUN ls -al /
RUN find /utils -type f -iname "*.sh" -exec chmod +x {} \;

# Install CPLEX
RUN /utils/install_cplex.sh
# Install gurobi
Expand All @@ -52,6 +50,7 @@ COPY src/ /src/
RUN mkdir /src/pytfa

COPY .bashrc $HOME
RUN chown "$USER" "$HOME/.bashrc"

#Finalizing installation

Expand Down
1 change: 1 addition & 0 deletions docker/requirements.txt
Expand Up @@ -5,6 +5,7 @@ lxml
openpyxl
pymysql
pytest
python-libsbml
scipy
sqlalchemy
tabulate
Expand Down
4 changes: 2 additions & 2 deletions docker/utils/activate_gurobi.sh
Expand Up @@ -2,8 +2,8 @@
# Choose the GHOME variable depending on your gurobi version

export GHOME_702="/opt/gurobi702/linux64"
export GHOME_750="/opt/gurobi750/linux64"
export GHOME=$GHOME_702
export GHOME_752="/opt/gurobi752/linux64"
export GHOME=$GHOME_752

if [ -d $GHOME ]; then \
#$GHOME/bin/grbgetkey $LICENSE_KEY && \
Expand Down
11 changes: 8 additions & 3 deletions docker/utils/install_cplex.sh
Expand Up @@ -6,10 +6,15 @@

echo "Installing and Moving CPLEX files"

# Default Py3.4 install
if [ -d /solvers/ibm ]; then cd /solvers/ibm/ILOG/CPLEX_Studio1271/cplex/python/3.5/x86-64_linux/ && \
# Default Py3.5 install
#if [ -d /solvers/ibm ]; then cd /solvers/ibm/ILOG/CPLEX_Studio1271/cplex/python/3.5/x86-64_linux/ && \#
# python3 setup.py install && \
# cp /solvers/ibm/ILOG/CPLEX_Studio1271/cplex/bin/x86-64_linux/cplex /usr/bin/; fi

# Default Py3.6 install
if [ -d /solvers/ibm ]; then cd /solvers/ibm/ILOG/CPLEX_Studio128/cplex/python/3.6/x86-64_linux/ && \
python3 setup.py install && \
cp /solvers/ibm/ILOG/CPLEX_Studio1271/cplex/bin/x86-64_linux/cplex /usr/bin/; fi
cp /solvers/ibm/ILOG/CPLEX_Studio128/cplex/bin/x86-64_linux/cplex /usr/bin/; fi

# Tweaked Py2.6/2.7 install on conda Venv

Expand Down
28 changes: 14 additions & 14 deletions docker/utils/install_gurobi.sh
Expand Up @@ -3,20 +3,20 @@

echo "Installing Gurobi"

# if [ -f /solvers/gurobi7.5.0_linux64.tar.gz ]; then \
# cp /solvers/gurobi7.5.0_linux64.tar.gz /opt && \
# cd /opt && \
# tar xvfz gurobi7.5.0_linux64.tar.gz && \
# cd /opt/gurobi750/linux64 && \
# python3 setup.py install && \
# rm gurobi7.0.2_linux64.tar.gz; fi


if [ -f /solvers/gurobi7.0.2_linux64.tar.gz ]; then \
cp /solvers/gurobi7.0.2_linux64.tar.gz /opt && \
if [ -f /solvers/gurobi7.5.2_linux64.tar.gz ]; then \
cp /solvers/gurobi7.5.2_linux64.tar.gz /opt && \
cd /opt && \
tar xvfz gurobi7.0.2_linux64.tar.gz && \
cd /opt/gurobi702/linux64 && \
tar xvfz gurobi7.5.2_linux64.tar.gz && \
cd /opt/gurobi752/linux64 && \
python3 setup.py install && \
rm /opt/gurobi7.0.2_linux64.tar.gz; fi
rm /opt/gurobi7.5.2_linux64.tar.gz; fi


#if [ -f /solvers/gurobi7.0.2_linux64.tar.gz ]; then \
# cp /solvers/gurobi7.0.2_linux64.tar.gz /opt && \
# cd /opt && \
# tar xvfz gurobi7.0.2_linux64.tar.gz && \
# cd /opt/gurobi702/linux64 && \
# python3 setup.py install && \
# rm /opt/gurobi7.0.2_linux64.tar.gz; fi
#

0 comments on commit d11f322

Please sign in to comment.