Skip to content

Commit 08b4589

Browse files
melange396dshemetov
andcommitted
Docker: merge requirements.txt and pin versions #1043 (#1046)
* sorted requirements.txt files * removed duplicated requirements from ./dev/docker/python/requirements.txt * reduce runs of "pip install" when creating "delphi_web_python" docker image * renamed requirements.txt to requirements.api.txt * merge dev/docker/python/requirements.txt with requirements.dev.txt * deduplicate packages in requirements.api.txt and requirements.dev.txt * pinned packages in requirements.dev.txt and removed unused Co-authored-by: Dmitry Shemetov <[email protected]>
1 parent 96153db commit 08b4589

File tree

5 files changed

+32
-49
lines changed

5 files changed

+32
-49
lines changed

dev/docker/python/Dockerfile

+2-5
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ RUN ln -s -f /usr/share/zoneinfo/America/New_York /etc/localtime
66
# specify a working directory inside the container
77
WORKDIR /usr/src/app
88

9-
# install python packages
10-
COPY repos/delphi/delphi-epidata/dev/docker/python/requirements.txt .
11-
RUN pip install --no-cache-dir -r requirements.txt
12-
139
# copy over all source files
1410
COPY repos repos
1511
RUN chmod -R o+r repos/
@@ -18,4 +14,5 @@ RUN chmod -R o+r repos/
1814
COPY repos/delphi/delphi-epidata/dev/docker/python/setup.sh .
1915
RUN bash setup.sh
2016

21-
RUN pip install --no-cache-dir -r repos/delphi/delphi-epidata/requirements.txt -r repos/delphi/delphi-epidata/requirements.dev.txt
17+
# install python packages
18+
RUN pip install --no-cache-dir -r repos/delphi/delphi-epidata/requirements.api.txt -r repos/delphi/delphi-epidata/requirements.dev.txt

dev/docker/python/requirements.txt

-31
This file was deleted.

devops/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source=https://github.com/cmu-delphi/delphi-epida
88
# use delphi's timezome
99
RUN ln -s -f /usr/share/zoneinfo/America/New_York /etc/localtime
1010

11-
COPY requirements.txt /app/requirements_also.txt
11+
COPY requirements.api.txt /app/requirements_also.txt
1212
RUN pip install --no-cache-dir -r /tmp/requirements.txt -r requirements_also.txt
1313
# the file /tmp/requirements.txt is created in the parent docker definition. (see:
1414
# https://github.com/tiangolo/meinheld-gunicorn-docker/blob/master/docker-images/python3.8.dockerfile#L5 )
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
epiweeks==2.1.2
2+
Flask==2.2.2
13
itsdangerous<2.1
24
jinja2==3.0.3
3-
werkzeug==2.2.2
4-
Flask==2.2.2
5-
SQLAlchemy==1.4.40
65
mysqlclient==2.1.1
7-
python-dotenv==0.15.0
6+
newrelic
87
orjson==3.4.7
98
pandas==1.2.3
9+
python-dotenv==0.15.0
1010
scipy==1.6.2
11+
SQLAlchemy==1.4.40
12+
structlog==22.1.0
1113
tenacity==7.0.0
12-
newrelic
13-
epiweeks==2.1.2
1414
typing-extensions
15-
structlog==22.1.0
15+
werkzeug==2.2.2

requirements.dev.txt

+22-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
1-
invoke>=1.4.1
1+
aiohttp==3.8.3
22
black>=20.8b1
3-
sqlalchemy-stubs>=0.3
3+
bump2version==1.0.1
4+
covidcast==0.1.5
5+
delphi_utils==0.3.6
6+
docker==6.0.1
7+
dropbox==11.36.0
8+
freezegun==1.2.2
9+
invoke>=1.4.1
10+
lxml==4.9.1
11+
matplotlib==3.6.2
412
mypy>=0.790
5-
pytest
13+
mysql-connector==2.2.9
14+
numpy==1.22.4
15+
pycountry==22.3.5
16+
pymysql==1.0.2
17+
pytest==7.2.0
18+
pytest-check==1.3.0
19+
requests==2.28.1
20+
sas7bdat==2.2.3
21+
selenium==4.7.2
22+
sqlalchemy-stubs>=0.3
23+
structlog==22.3.0
624
tenacity==7.0.0
7-
bump2version
8-
requests
25+
xlrd==2.0.1

0 commit comments

Comments
 (0)