Skip to content

Commit

Permalink
improve Dockerfile
Browse files Browse the repository at this point in the history
- Reduce size of context being sent
- Use requirements.txt for Python installation
- Update Python requirements to match what is being installed
  • Loading branch information
slhck committed Apr 6, 2020
1 parent 31565cf commit 8934c13
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
@@ -1,2 +1,4 @@
matlab
workspace
python/.tox
.git
10 changes: 6 additions & 4 deletions Dockerfile
Expand Up @@ -14,18 +14,20 @@ RUN apt-get update && \
python3-dev \
python3-pip \
python3-setuptools \
python3-wheel \
python3-tk \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists

# get and install tools for python
RUN pip3 install --upgrade pip
RUN pip install numpy scipy matplotlib notebook pandas sympy nose scikit-learn scikit-image h5py sureal meson

# retrieve source code
COPY . /vmaf

# install python requirements
RUN pip3 install --upgrade pip
RUN pip3 install --no-cache-dir meson
RUN pip3 install --no-cache-dir -r /vmaf/python/requirements.txt

# setup environment
ENV PYTHONPATH=/vmaf/python/src:/vmaf:$PYTHONPATH
ENV PATH=/vmaf:/vmaf/src/libvmaf:$PATH
Expand Down
14 changes: 7 additions & 7 deletions python/requirements.txt
@@ -1,9 +1,9 @@
numpy
scipy>=0.17.1
matplotlib>=2.0.0
pandas>=0.19.2
scikit-learn>=0.18.1
scikit-image>=0.13.1
numpy>=1.18.2
scipy>=1.4.1
matplotlib>=3.2.1
pandas>=1.0.3
scikit-learn>=0.22.2
scikit-image>=0.16.2
h5py>=2.6.0
sureal>=0.1.0
sureal>=0.4.2
dill>=0.3.1

0 comments on commit 8934c13

Please sign in to comment.