Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

Commit d56e267

Browse files
ir413facebook-github-bot
authored andcommitted
Use a requirements file to specify python dependencies
Reviewed By: rbgirshick Differential Revision: D8117250 fbshipit-source-id: 1cd6e033c3ed3057afeeb92ed86a20d807549b5a
1 parent a6a7953 commit d56e267

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

INSTALL.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ If the `caffe2` Python package is not found, you likely need to adjust your `PYT
3333

3434
## Other Dependencies
3535

36-
Install Python dependencies:
37-
38-
```
39-
pip install numpy>=1.13 pyyaml>=3.12 matplotlib opencv-python>=3.2 setuptools Cython mock scipy
40-
```
41-
4236
Install the [COCO API](https://github.com/cocodataset/cocoapi):
4337

4438
```
@@ -63,6 +57,12 @@ Clone the Detectron repository:
6357
git clone https://github.com/facebookresearch/detectron $DETECTRON
6458
```
6559

60+
Install Python dependencies:
61+
62+
```
63+
pip install -r $DETECTRON/requirements.txt
64+
```
65+
6666
Set up Python modules:
6767

6868
```

docker/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ ENV Caffe2_DIR /usr/local/caffe2_build
77
ENV PYTHONPATH /usr/local/caffe2_build:${PYTHONPATH}
88
ENV LD_LIBRARY_PATH /usr/local/caffe2_build/lib:${LD_LIBRARY_PATH}
99

10+
# Clone the Detectron repository
11+
RUN git clone https://github.com/facebookresearch/detectron /detectron
12+
1013
# Install Python dependencies
11-
RUN pip install numpy>=1.13 pyyaml>=3.12 matplotlib opencv-python>=3.2 setuptools Cython mock scipy
14+
RUN pip install -r /detectron/requirements.txt
1215

1316
# Install the COCO API
1417
RUN git clone https://github.com/cocodataset/cocoapi.git /cocoapi
1518
WORKDIR /cocoapi/PythonAPI
1619
RUN make install
1720

18-
# Clone the Detectron repository
19-
RUN git clone https://github.com/facebookresearch/detectron /detectron
20-
2121
# Go to Detectron root
2222
WORKDIR /detectron
2323

requirements.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
numpy>=1.13
2+
pyyaml>=3.12
3+
matplotlib
4+
opencv-python>=3.2
5+
setuptools
6+
Cython
7+
mock
8+
scipy

0 commit comments

Comments
 (0)