From 541600f6f5b5131b894aa7947b30b6d19d8fb348 Mon Sep 17 00:00:00 2001 From: Vithursan Thangarasa Date: Fri, 16 Mar 2018 11:05:53 -0400 Subject: [PATCH] Add requirements.txt to install dependencies in Docker container --- Dockerfile | 16 +++------------- README.md | 6 +----- requirements.txt | 10 ++++++++++ 3 files changed, 14 insertions(+), 18 deletions(-) create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile index 68ef6c6..25bfd8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,17 +29,9 @@ RUN curl -O https://bootstrap.pypa.io/get-pip.py && \ rm get-pip.py # Install Python dependencies -RUN pip install -U \ - numpy \ - matplotlib \ - seaborn \ - pandas \ - tqdm \ - pillow \ - setuptools \ - sklearn \ - scipy \ - visdom +COPY requirements.txt /root/MagnetLoss/requirements.txt +WORKDIR /root/MagnetLoss +RUN pip install --upgrade -r requirements.txt # Install PyTorch RUN pip install http://download.pytorch.org/whl/cu90/torch-0.3.1-cp27-cp27mu-linux_x86_64.whl @@ -47,6 +39,4 @@ RUN pip install torchvision COPY ./ /root/MagnetLoss -WORKDIR /root/MagnetLoss - CMD /bin/bash diff --git a/README.md b/README.md index 9386934..2f2aed4 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,8 @@ PyTorch implementation of the Magnet Loss for Deep Metric Learning, based on the ## Table of Contents * [Installation](#installation) * [Anaconda](#anaconda) -* [Docker](#docker) +* [Docker GPU Training](#docker-gpu-training) * [Results](#results) -* [Other Implementations](#other-implementations) * [Citing MagnetLoss-PyTorch](#citing-magnetloss-pytorch) ## Installation @@ -89,9 +88,6 @@ or |12000 | | |14000 | | -### Other Implementations -* [Magnet Loss in Tensorflow](https://github.com/pumpikano/tf-magnet-loss) - ### Citing MagnetLoss-PyTorch If you use MagnetLoss-PyTorch in a scientific publication, I would appreciate references to the source code. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e4d0380 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,10 @@ +matplotlib +numpy +pandas +pillow +scipy +seaborn +setuptools +sklearn +tqdm +visdom