Skip to content
Snippets Groups Projects
Commit 13597db0 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[Docker] add cmdline arg to run-docker to start notebooks or tests

parent 5f089eae
No related branches found
No related tags found
No related merge requests found
......@@ -36,4 +36,3 @@ RUN chown -R $UNAME:$GNAME /home/$UNAME
USER $UNAME
WORKDIR /home/$UNAME/finn
ENTRYPOINT /bin/bash
#!/bin/sh
#!/bin/bash
if [ -z "$VIVADO_PATH" ];then
echo "For correct implementation please set an environment variable VIVADO_PATH that contains the path to your vivado installation directory"
......@@ -41,6 +41,17 @@ echo "Mounting $SCRIPTPATH/cnpy into /workspace/cnpy"
echo "Mounting $SCRIPTPATH/finn-hlslib into /workspace/finn-hlslib"
echo "Mounting $VIVADO_PATH/include into /workspace/vivado-hlslib"
if [ "$1" = "test" ]; then
echo "Running test suite"
DOCKER_CMD="python setup.py test"
elif [ "$1" = "notebook" ]; then
echo "Running Jupyter notebook server"
DOCKER_CMD="jupyter notebook --ip=0.0.0.0 notebooks"
else
echo "Running container only"
DOCKER_CMD="bash"
fi
# Build the FINN Docker image
docker build --tag=$DOCKER_TAG \
--build-arg GID=$DOCKER_GID \
......@@ -58,4 +69,4 @@ docker run --rm --name finn_dev -it \
-v $SCRIPTPATH/finn-hlslib:/workspace/finn-hlslib \
-v $VIVADO_PATH/include:/workspace/vivado-hlslib \
-p 8888:8888 \
$DOCKER_TAG bash
$DOCKER_TAG $DOCKER_CMD
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment