Skip to content

Commit 101faab

Browse files
author
Ezequiel Torres
committed
Additions to dockerfiles and package creation script
1 parent c237619 commit 101faab

File tree

6 files changed

+36
-10
lines changed

6 files changed

+36
-10
lines changed

tools/installer/Dockerfiles/centos7.dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ RUN wget https://sourceforge.net/projects/pyqt/files/PyQtDataVisualization/PyQtD
127127
rm -rf /tmp/PyQtDataVisualization_gpl-5.7.1*
128128

129129
# Install mlc dependencies
130-
RUN /opt/mlc-python-2.7.11/bin/mlc_pip install pyserial numpy nose matplotlib scipy pyyaml flask requests
130+
RUN /opt/mlc-python-2.7.11/bin/mlc_pip install ipython pyserial numpy nose matplotlib scipy pyyaml flask requests pyusb
131+
RUN gem install fpm
131132

132133
ARG RELEASE
133134
ENV RELEASE ${RELEASE}
134-
ENV OS_VERSION ubuntu-16.04
135+
ENV OS_VERSION centos-7
136+
ENV PACKAGE_TYPE rpm
135137
ADD deploy_scripts/* /tmp/deploy_scripts/
136138
ENTRYPOINT ["/tmp/deploy_scripts/create_MLC_folder.sh"]

tools/installer/Dockerfiles/deploy_scripts/create_MLC_folder.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ tar xzvf v$RELEASE.tar.gz -C $MLC_PATH
1010
rm -rf /tmp/v$RELEASE.tar.gz
1111

1212
# Add the mlc_python
13-
mv /opt/mlc-python-2.7.11 $MLC_PATH/mlc_python
13+
cp -r /opt/mlc-python-2.7.11 $MLC_PATH/mlc_python
1414

1515
# Add project scripts
1616
cp -r /tmp/deploy_scripts/mlc.sh.in $MLC_PATH/mlc.sh
@@ -21,5 +21,18 @@ cp -r /tmp/deploy_scripts/install_matlab_engine.sh $MLC_PATH/tools
2121
cd $MLC_PATH
2222
ln -s mlc_python/bin/mlc_python mlc_python.sh
2323
ln -s mlc_python/bin/mlc_ipython mlc_ipython.sh
24+
ln -s mlc_python/bin/mlc_pip mlc_pip.sh
25+
26+
# Clean unnecesary files in the MLC package
27+
find $MLC_PATH/mlc_python -name "*.pyc" | xargs rm -rf
28+
find $MLC_PATH/mlc_python -name "*.pyo" | xargs rm -rf
29+
find $MLC_PATH/mlc_python -name "*.pyd" | xargs rm -rf
30+
find $MLC_PATH/mlc_python -name "test" | xargs rm -rf
31+
rm -rf $MLC_PATH/Qt-5.7.1/docs
32+
rm -rf $MLC_PATH/Qt-5.7.1/include
33+
rm -rf $MLC_PATH/Qt-5.7.1/mkspecs
34+
35+
# Create the MLC Package
2436
tar cJvpf /tmp/MLC-$RELEASE-$OS_VERSION.tar.xz -C /tmp MLC-$RELEASE
37+
fpm -s dir -t $PACKAGE_TYPE -v $RELEASE -n mlc-python-$OS_VERSION /opt/mlc-python-2.7.11
2538
bash

tools/installer/Dockerfiles/fedora20.dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ RUN wget https://sourceforge.net/projects/pyqt/files/PyQtDataVisualization/PyQtD
134134
rm -rf /tmp/PyQtDataVisualization_gpl-5.7.1*
135135

136136
# Install mlc dependencies
137-
RUN /opt/mlc-python-2.7.11/bin/mlc_pip install ipython pyserial numpy nose matplotlib scipy pyyaml flask requests
137+
RUN /opt/mlc-python-2.7.11/bin/mlc_pip install ipython pyserial numpy nose matplotlib scipy pyyaml flask requests pyusb
138+
RUN gem install fpm
138139

139140
ARG RELEASE
140141
ENV RELEASE ${RELEASE}
141-
ENV OS_VERSION ubuntu-16.04
142+
ENV OS_VERSION fedora-20
143+
ENV PACKAGE_TYPE rpm
142144
ADD deploy_scripts/* /tmp/deploy_scripts/
143145
ENTRYPOINT ["/tmp/deploy_scripts/create_MLC_folder.sh"]

tools/installer/Dockerfiles/ubuntu1404.dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,13 @@ RUN wget https://sourceforge.net/projects/pyqt/files/PyQtDataVisualization/PyQtD
155155
# Create .sh who will load the desired enviroment to run nosetests within it
156156
RUN export LD_LIBRARY_PATH=/usr/local/Qt-5.7.1/lib:$LD_LIBRARY_PATH && \
157157
export PATH=/usr/local/Qt-5.7.1/bin:$PATH && \
158-
/opt/mlc-python-2.7.11/bin/mlc_pip install ipython numpy flask requests pyserial nose pyyaml coverage matplotlib scipy
158+
/opt/mlc-python-2.7.11/bin/mlc_pip install ipython numpy flask requests pyserial nose pyyaml coverage matplotlib scipy pyusb
159+
160+
RUN gem install fpm
159161

160162
ARG RELEASE
161163
ENV RELEASE ${RELEASE}
162-
ENV OS_VERSION ubuntu-16.04
164+
ENV OS_VERSION ubuntu-14.04
165+
ENV PACKAGE_TYPE deb
163166
ADD deploy_scripts/* /tmp/deploy_scripts/
164167
ENTRYPOINT ["/tmp/deploy_scripts/create_MLC_folder.sh"]

tools/installer/Dockerfiles/ubuntu1604.dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,13 @@ RUN wget https://sourceforge.net/projects/pyqt/files/PyQtDataVisualization/PyQtD
155155
# Create .sh who will load the desired enviroment to run nosetests within it
156156
RUN export LD_LIBRARY_PATH=/usr/local/Qt-5.7.1/lib:$LD_LIBRARY_PATH && \
157157
export PATH=/usr/local/Qt-5.7.1/bin:$PATH && \
158-
/opt/mlc-python-2.7.11/bin/mlc_pip install ipython numpy flask requests pyserial nose pyyaml coverage matplotlib scipy
158+
/opt/mlc-python-2.7.11/bin/mlc_pip install ipython numpy flask requests pyserial nose pyyaml coverage matplotlib scipy pyusb
159+
160+
RUN gem install fpm
159161

160162
ARG RELEASE
161163
ENV RELEASE ${RELEASE}
162164
ENV OS_VERSION ubuntu-16.04
165+
ENV PACKAGE_TYPE deb
163166
ADD deploy_scripts/* /tmp/deploy_scripts/
164167
ENTRYPOINT ["/tmp/deploy_scripts/create_MLC_folder.sh"]

tools/installer/Dockerfiles/ubuntu1610.dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,13 @@ RUN wget https://sourceforge.net/projects/pyqt/files/PyQtDataVisualization/PyQtD
155155
# Create .sh who will load the desired enviroment to run nosetests within it
156156
RUN export LD_LIBRARY_PATH=/usr/local/Qt-5.7.1/lib:$LD_LIBRARY_PATH && \
157157
export PATH=/usr/local/Qt-5.7.1/bin:$PATH && \
158-
/opt/mlc-python-2.7.11/bin/mlc_pip install ipython numpy flask requests pyserial nose pyyaml coverage matplotlib scipy
158+
/opt/mlc-python-2.7.11/bin/mlc_pip install ipython numpy flask requests pyserial nose pyyaml coverage matplotlib scipy pyusb
159+
160+
RUN gem install fpm
159161

160162
ARG RELEASE
161163
ENV RELEASE ${RELEASE}
162-
ENV OS_VERSION ubuntu-16.04
164+
ENV OS_VERSION ubuntu-16.10
165+
ENV PACKAGE_TYPE deb
163166
ADD deploy_scripts/* /tmp/deploy_scripts/
164167
ENTRYPOINT ["/tmp/deploy_scripts/create_MLC_folder.sh"]

0 commit comments

Comments
 (0)