Skip to content

Commit 017908b

Browse files
committed
use pip-compile to freeze dependencies
for more explicit version upgrades in images requirements-txt-fixer isn't helpful
1 parent fdb9b90 commit 017908b

File tree

4 files changed

+201
-18
lines changed

4 files changed

+201
-18
lines changed

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ RUN apt-get update \
1313
nodejs \
1414
npm
1515

16-
# Python requirements
17-
COPY ./requirements.txt /srv/nbviewer/
18-
19-
RUN python3 -mpip install -r /srv/nbviewer/requirements.txt
16+
# Build requirements
17+
COPY ./requirements-dev.txt /srv/nbviewer/
18+
RUN python3 -mpip install -r /srv/nbviewer/requirements-dev.txt
2019

2120
WORKDIR /srv/nbviewer
2221

2322
# Copy source tree in
2423
COPY . /srv/nbviewer
2524
RUN python3 setup.py build && \
26-
python3 -mpip wheel -vv . -w /wheels
25+
python3 -mpip wheel -vv -r requirements.txt . -w /wheels
2726

2827
# Now define the runtime image
2928
FROM python:3.10-slim-bullseye

requirements.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
elasticsearch
2+
ipython
3+
jupyter_client
4+
jupyter_server>=0.2.0
5+
markdown>=3.0,==3.1.1 # pin until we workaround #909, which is a regression in 3.2
6+
nbconvert>=5.4,<6.0.0 # pin to fix #958
7+
nbformat>=4.2
8+
newrelic!=2.80.0.60
9+
pycurl
10+
pylibmc
11+
statsd
12+
tornado>=6.0

requirements.txt

Lines changed: 184 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,184 @@
1-
elasticsearch
2-
ipython
3-
jupyter_client
4-
jupyter_server>=0.2.0
5-
markdown>=3.0,==3.1.1 # pin until we workaround #909, which is a regression in 3.2
6-
nbconvert>=5.4,<6.0.0 # pin to fix #958
7-
nbformat>=4.2
8-
newrelic!=2.80.0.60
9-
pycurl
10-
pylibmc
11-
statsd
12-
tornado>=6.0
1+
#
2+
# This file is autogenerated by pip-compile with python 3.10
3+
# To update, run:
4+
#
5+
# pip-compile
6+
#
7+
anyio==3.5.0
8+
# via jupyter-server
9+
argon2-cffi==21.3.0
10+
# via jupyter-server
11+
argon2-cffi-bindings==21.2.0
12+
# via argon2-cffi
13+
asttokens==2.0.5
14+
# via stack-data
15+
attrs==21.4.0
16+
# via jsonschema
17+
backcall==0.2.0
18+
# via ipython
19+
black==21.12b0
20+
# via ipython
21+
bleach==4.1.0
22+
# via nbconvert
23+
certifi==2021.10.8
24+
# via elasticsearch
25+
cffi==1.15.0
26+
# via argon2-cffi-bindings
27+
click==8.0.3
28+
# via black
29+
decorator==5.1.1
30+
# via ipython
31+
defusedxml==0.7.1
32+
# via nbconvert
33+
elasticsearch==7.16.3
34+
# via -r requirements.in
35+
entrypoints==0.3
36+
# via
37+
# jupyter-client
38+
# nbconvert
39+
executing==0.8.2
40+
# via stack-data
41+
idna==3.3
42+
# via anyio
43+
ipython==8.0.1
44+
# via -r requirements.in
45+
ipython-genutils==0.2.0
46+
# via
47+
# jupyter-server
48+
# nbformat
49+
jedi==0.18.1
50+
# via ipython
51+
jinja2==3.0.3
52+
# via
53+
# jupyter-server
54+
# nbconvert
55+
jsonschema==4.4.0
56+
# via nbformat
57+
jupyter-client==7.1.2
58+
# via
59+
# -r requirements.in
60+
# jupyter-server
61+
jupyter-core==4.9.1
62+
# via
63+
# jupyter-client
64+
# jupyter-server
65+
# nbconvert
66+
# nbformat
67+
jupyter-server==1.13.4
68+
# via -r requirements.in
69+
markdown==3.1.1
70+
# via -r requirements.in
71+
markupsafe==2.0.1
72+
# via jinja2
73+
matplotlib-inline==0.1.3
74+
# via ipython
75+
mistune==0.8.4
76+
# via nbconvert
77+
mypy-extensions==0.4.3
78+
# via black
79+
nbconvert==5.6.1
80+
# via
81+
# -r requirements.in
82+
# jupyter-server
83+
nbformat==5.1.3
84+
# via
85+
# -r requirements.in
86+
# jupyter-server
87+
# nbconvert
88+
nest-asyncio==1.5.4
89+
# via jupyter-client
90+
newrelic==7.4.0.172
91+
# via -r requirements.in
92+
packaging==21.3
93+
# via
94+
# bleach
95+
# jupyter-server
96+
pandocfilters==1.5.0
97+
# via nbconvert
98+
parso==0.8.3
99+
# via jedi
100+
pathspec==0.9.0
101+
# via black
102+
pexpect==4.8.0
103+
# via ipython
104+
pickleshare==0.7.5
105+
# via ipython
106+
platformdirs==2.4.1
107+
# via black
108+
prometheus-client==0.13.0
109+
# via jupyter-server
110+
prompt-toolkit==3.0.26
111+
# via ipython
112+
ptyprocess==0.7.0
113+
# via
114+
# pexpect
115+
# terminado
116+
pure-eval==0.2.2
117+
# via stack-data
118+
pycparser==2.21
119+
# via cffi
120+
pycurl==7.44.1
121+
# via -r requirements.in
122+
pygments==2.11.2
123+
# via
124+
# ipython
125+
# nbconvert
126+
pylibmc==1.6.1
127+
# via -r requirements.in
128+
pyparsing==3.0.7
129+
# via packaging
130+
pyrsistent==0.18.1
131+
# via jsonschema
132+
python-dateutil==2.8.2
133+
# via jupyter-client
134+
pyzmq==22.3.0
135+
# via
136+
# jupyter-client
137+
# jupyter-server
138+
send2trash==1.8.0
139+
# via jupyter-server
140+
six==1.16.0
141+
# via
142+
# asttokens
143+
# bleach
144+
# python-dateutil
145+
sniffio==1.2.0
146+
# via anyio
147+
stack-data==0.1.4
148+
# via ipython
149+
statsd==3.3.0
150+
# via -r requirements.in
151+
terminado==0.13.1
152+
# via jupyter-server
153+
testpath==0.5.0
154+
# via nbconvert
155+
tomli==1.2.3
156+
# via black
157+
tornado==6.1
158+
# via
159+
# -r requirements.in
160+
# jupyter-client
161+
# jupyter-server
162+
# terminado
163+
traitlets==5.1.1
164+
# via
165+
# ipython
166+
# jupyter-client
167+
# jupyter-core
168+
# jupyter-server
169+
# matplotlib-inline
170+
# nbconvert
171+
# nbformat
172+
typing-extensions==4.0.1
173+
# via black
174+
urllib3==1.26.8
175+
# via elasticsearch
176+
wcwidth==0.2.5
177+
# via prompt-toolkit
178+
webencodings==0.5.1
179+
# via bleach
180+
websocket-client==1.2.3
181+
# via jupyter-server
182+
183+
# The following packages are considered to be unsafe in a requirements file:
184+
# setuptools

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def walk_subpkg(name):
8888
)
8989

9090
install_requires = setup_args["install_requires"] = []
91-
with open("requirements.txt") as f:
91+
with open("requirements.in") as f:
9292
for line in f:
9393
req = line.strip()
9494
if not req.startswith("#"):

0 commit comments

Comments
 (0)