Skip to content

Commit

Permalink
Add requirements.txt for doccker-java-and-python, and instructions fo…
Browse files Browse the repository at this point in the history
…r updating the requirements.txt
  • Loading branch information
devinrsmith committed Nov 16, 2021
1 parent 9437c2c commit 1284416
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 14 deletions.
30 changes: 25 additions & 5 deletions docker/java-and-python/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN set -eux; \
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
ENV JAVA_HOME=/usr/lib/jvm/zulu11-ca-amd64

FROM java_base
FROM java_base as python_install
RUN set -eux; \
apt-get -qq update; \
apt-get -qq -y --no-install-recommends install \
Expand All @@ -33,7 +33,27 @@ RUN set -eux; \
python3-setuptools \
python3-wheel \
; \
rm -rf /var/lib/apt/lists/*; \
python3 -m pip install -q --no-cache-dir --upgrade pip; \
python3 -m pip install -q --no-cache-dir --upgrade setuptools; \
python3 -m pip install -q --no-cache-dir --upgrade wheel
rm -rf /var/lib/apt/lists/*

# To update the requirements.txt:
# 1. Comment out BLOCK 1, and uncomment BLOCK 2
# 2. Run `./gradlew docker-java-and-python:build`
# 3. Run `docker run --rm -it deephaven/java-and-python:local-build pip freeze --all > docker/java-and-python/src/main/docker/requirements.txt`
# 4. Uncomment BLOCK 1, and comment out BLOCK 2

# START BLOCK 1
COPY requirements.txt requirements.txt
RUN set -eux; \
python3 -m pip install --no-cache-dir -r requirements.txt; \
rm requirements.txt
# END BLOCK 1

# START BLOCK 2
#RUN set -eux; \
# python3 -m pip install --no-cache-dir --upgrade pip; \
# python3 -m pip install --no-cache-dir --upgrade setuptools; \
# python3 -m pip install --no-cache-dir --upgrade wheel
# END BLOCK 2

FROM java_base
COPY --from=python_install / /
3 changes: 3 additions & 0 deletions docker/java-and-python/src/main/docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pip==21.3.1
setuptools==59.0.1
wheel==0.37.0
10 changes: 10 additions & 0 deletions docker/runtime-base/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@ RUN set -eux; \
apt-get -qq -y --no-install-recommends install liblzo2-2 curl; \
rm -rf /var/lib/apt/lists/*

# To update the requirements.txt:
# 1. Comment out BLOCK 1
# 2. Remove the --no-index arguments from the RUNs
# 3. Run `./gradlew docker-runtime-base:build`
# 4. Run `docker run --rm -it deephaven/runtime-base:local-build pip freeze | grep -v " @ file" > docker/runtime-base/src/main/docker/requirements.txt`
# 5. Replace the --no-index arguments from the RUNs
# 6. Uncomment BLOCK 1

# START BLOCK 1
COPY requirements.txt requirements.txt
RUN set -eux; \
python3 -m pip install --no-cache-dir -r requirements.txt; \
rm requirements.txt
# END BLOCK 1

COPY deephaven-jpy-wheel/ /deephaven-jpy-wheel
RUN set -eux; \
Expand Down
18 changes: 9 additions & 9 deletions docker/runtime-base/src/main/docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dill==0.3.4
llvmlite==0.37.0
numba==0.54.1
numpy==1.20.3
pandas==1.3.4
python-dateutil==2.8.2
pytz==2021.3
six==1.16.0
wrapt==1.13.3
dill==0.3.4
llvmlite==0.37.0
numba==0.54.1
numpy==1.20.3
pandas==1.3.4
python-dateutil==2.8.2
pytz==2021.3
six==1.16.0
wrapt==1.13.3

0 comments on commit 1284416

Please sign in to comment.