optimized workflow and used the Dockerfile in .
This commit is contained in:
parent
8700d291ff
commit
e2033fc46d
@ -395,6 +395,12 @@ RUN conda update -n base conda -y
|
||||
|
||||
USER root
|
||||
|
||||
# Install elasticsearch libs
|
||||
USER root
|
||||
RUN apt-get update \
|
||||
&& curl -sL https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-hadoop/6.8.1/elasticsearch-hadoop-6.8.1.jar
|
||||
RUN pip install --no-cache-dir elasticsearch==7.1.0
|
||||
|
||||
# Install rpy2 to share data between Python and R
|
||||
RUN conda install rpy2=2.9.4 plotly=4.4.1
|
||||
RUN conda install -c conda-forge ipyleaflet
|
||||
|
@ -2,7 +2,7 @@ version: "3.4"
|
||||
services:
|
||||
gpu-jupyter:
|
||||
image: 127.0.0.1:$REGISTRY_PORT/gpu-jupyter
|
||||
build: ./src/
|
||||
build: .
|
||||
ports:
|
||||
- $JUPYTER_PORT:8888
|
||||
volumes:
|
||||
|
@ -2,7 +2,7 @@ version: "3.4"
|
||||
services:
|
||||
gpu-jupyter:
|
||||
image: 127.0.0.1:5001/gpu-jupyter
|
||||
build: ./src/
|
||||
build: .
|
||||
ports:
|
||||
- ${JUPYTER_PORT}:8888
|
||||
volumes:
|
||||
|
@ -9,7 +9,8 @@ export STACKS_DIR=".build/docker-stacks"
|
||||
# Clone if docker-stacks doesn't exist, and pull.
|
||||
ls $STACKS_DIR/README.md > /dev/null 2>&1 || (echo "Docker-stacks was not found, cloning repository" \
|
||||
&& git clone https://github.com/jupyter/docker-stacks.git $STACKS_DIR)
|
||||
git pull -f $STACKS_DIR
|
||||
cd $STACKS_DIR && git pull && cd -
|
||||
|
||||
|
||||
# Write the contents into the DOCKERFILE and start with the header
|
||||
cat src/Dockerfile.header > $DOCKERFILE
|
||||
|
@ -1,28 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
cd $(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||
|
||||
# Fetching port
|
||||
PORT=0
|
||||
HELP=0
|
||||
while [[ "$#" -gt 0 ]]; do case $1 in
|
||||
-p|--port) PORT="$2"; shift;;
|
||||
-h|--help) HELP=1;;
|
||||
*) echo "Unknown parameter passed: $1"; exit 1;;
|
||||
esac; shift; done
|
||||
|
||||
# Print help
|
||||
if [[ $HELP != 0 ]]; then
|
||||
echo "Usage: $0 -p [port] # port must be an integer with 4 or more digits."
|
||||
exit 21
|
||||
fi
|
||||
|
||||
# Check if port is valid
|
||||
if [[ $PORT != [0-9][0-9][0-9][0-9]* ]]; then
|
||||
echo "The port is not set or invalid."
|
||||
echo "Usage: $0 -p [port] # port must be an integer with 4 or more digits."
|
||||
exit 22
|
||||
fi
|
||||
|
||||
# Build and run the Dockerfile
|
||||
docker build -t gpu-jupyter .
|
||||
docker run -d -p "$PORT":8888 gpu-jupyter
|
Loading…
Reference in New Issue
Block a user