Parametrised hostname
This commit is contained in:
parent
a66928eb61
commit
de87185185
@ -31,9 +31,10 @@ if [[ "$result" != *" $NETWORK "* ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# starting in swarm
|
# starting in swarm
|
||||||
echo "Adding gpu-jupyter to the swarm in the network $NETWORK on port $PORT."
|
export HOSTNAME=$(hostname)
|
||||||
export JUPYTER_PORT=$PORT
|
export JUPYTER_PORT=$PORT
|
||||||
export JUPYTER_NETWORK=$NETWORK
|
export JUPYTER_NETWORK=$NETWORK
|
||||||
|
echo "Adding gpu-jupyter to the swarm on the node $HOSTNAME in the network $NETWORK on port $PORT."
|
||||||
# echo $JUPYTER_NETWORK
|
# echo $JUPYTER_NETWORK
|
||||||
envsubst < docker-compose-swarm.yml > .docker-compose-swarm.yml.envsubst
|
envsubst < docker-compose-swarm.yml > .docker-compose-swarm.yml.envsubst
|
||||||
docker-compose -f .docker-compose-swarm.yml.envsubst build
|
docker-compose -f .docker-compose-swarm.yml.envsubst build
|
||||||
|
@ -18,7 +18,7 @@ services:
|
|||||||
- $JUPYTER_NETWORK
|
- $JUPYTER_NETWORK
|
||||||
deploy:
|
deploy:
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.hostname == data-science]
|
constraints: [node.hostname == $HOSTNAME]
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpus: "4"
|
cpus: "4"
|
||||||
|
Loading…
Reference in New Issue
Block a user