Skip to content

Commit 37caec9

Browse files
committed
updated Dockerfile based on feedback to use conda for wget and vim installs instead of OS package manager
1 parent ba6e66f commit 37caec9

1 file changed

Lines changed: 11 additions & 13 deletions

File tree

Dockerfile

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
11
FROM python:3.7.5-slim
22
USER root
3+
SHELL ["/bin/bash", "--login", "-c"]
34

45
ENV DEBIAN_FRONTEND noninteractive
56
ENV SCALA_VERSION 2.11
67
ENV KAFKA_VERSION 2.3.0
78
ENV KAFKA_HOME /opt/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION"
89

9-
# Install system dependencies and convenience utilities
10-
RUN apt-get update -y && \
11-
apt-get install -y wget \
12-
vim && \
13-
apt-get clean
14-
1510
# Install conda
1611
ADD https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh /miniconda.sh
1712
RUN sh /miniconda.sh -b -p /conda && /conda/bin/conda update -n base conda
18-
ENV PATH=${PATH}:/conda/bin
19-
SHELL ["/bin/bash", "-c"]
13+
RUN echo "PATH=${PATH}:/conda/bin" >> ~/.bashrc
2014

2115
# Add Streamz source code to the build context
2216
ADD . /streamz/.
2317

2418
# Create the conda environment
2519
RUN conda env create --name streamz-dev -f /streamz/conda/environments/streamz_dev.yml
20+
RUN conda init bash
21+
22+
# Ensures subsequent RUN commands do not need the "conda activate streamz_dev" command
23+
RUN echo "conda activate streamz_dev" >> ~/.bashrc
2624

2725
# Build streamz from source
28-
RUN source activate streamz-dev && \
29-
cd /streamz && \
26+
RUN cd /streamz && \
3027
python setup.py install
3128

3229
# Install optional dependencies in the conda environment
33-
RUN source activate streamz-dev && \
34-
conda install -c conda-forge jupyterlab \
30+
RUN conda install -c conda-forge jupyterlab \
3531
numpy \
36-
pandas
32+
pandas \
33+
wget \
34+
vim
3735

3836
# Install Kafka
3937
RUN wget -q http://www.gtlib.gatech.edu/pub/apache/kafka/2.3.0/kafka_2.11-2.3.0.tgz -O /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz && \

0 commit comments

Comments
 (0)