jreades / sds_env

Spatial Data Science Environment
BSD 3-Clause "New" or "Revised" License
22 stars 20 forks source link

Problem with sh docker.sh #2

Open huanfachen opened 1 year ago

huanfachen commented 1 year ago

I tried running sh docker.sh start in Windows WSL, and got the following errors:

docker.sh: 9: [[: not found
Using default configuration as config.sh.
docker.sh: 19: source: not found
docker.sh: 28: [[: not found
docker.sh: 81: [[: not found
You need to pass either start or stop to this script.

Env and settings: OS: Windows 10, WSL 2 Files: docker.sh and config.sh in the same folder Can run Jupyter Lab in the WSL terminal of this folder: docker run --name sds --rm -ti -p 8888:8888 -v "$(pwd):/home/jovyan/work" jreades/sds:2022 jupyter lab --LabApp.password='sha1:288f84f833b0:7645388b889d84efbb2716d646e5eadd78b67d10' --ServerApp.password='sha1:288f84f833b0:7645388b889d84efbb2716d646e5eadd78b67d10'

@jreades Jon, any suggestions?

jreades commented 1 year ago

I’ve tried a quick patch based on my understanding of the potential causes. Try refreshing the docker.sh file from GitHub (you should see the ‘[[‘ disappear along with the ’source’ commands in the original file.

Jon

On 22 Sep 2022, 19:35 +0100, Huanfa Chen @.***>, wrote:

I tried running sh docker.sh start in Windows WSL, and got the following errors: docker.sh: 9: [[: not found Using default configuration as config.sh. docker.sh: 19: source: not found docker.sh: 28: [[: not found docker.sh: 81: [[: not found You need to pass either start or stop to this script. Env and settings: OS: Windows 10, WSL 2 Files: docker.sh and config.sh in the same folder Can run Jupyter Lab in the WSL terminal of this folder: docker run --name sds --rm -ti -p 8888:8888 -v "$(pwd):/home/jovyan/work" jreades/sds:2022 jupyter lab --LabApp.password='sha1:288f84f833b0:7645388b889d84efbb2716d646e5eadd78b67d10' --ServerApp.password='sha1:288f84f833b0:7645388b889d84efbb2716d646e5eadd78b67d10' @jreades Jon, any suggestions? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

huanfachen commented 1 year ago

I tried the updated docker.sh, getting the new problem:

Using default configuration as config.sh.
docker.sh: 1: eval: -s: not found
docker.sh: 1: eval: -s: not found
docker.sh: 1: eval: -s: not found
docker.sh: 1: eval: -s: not found
docker.sh: 1: eval: -s: not found
docker.sh: 267: .: Can't open /etc/Renviron
jreades commented 1 year ago

If you uncomment ‘set -xe’ you should get a lot more debugging output; however, this one has me stumped. I have a suspicion it might be something to do with the config.sh file and how I’ve organised it… The only thing I can think of right now is changing this line:

!/usr/bin/env bash

To this:

!/bin/bash

If that doesn’t work then we’ll have to test on a Windows machine I think.

Jon

-- mob: 07976987392 email: @. skype: jreades On 22 Sep 2022, 20:18 +0100, Huanfa Chen @.>, wrote:

I tried the updated docker.sh, getting the new problem: Using default configuration as config.sh. docker.sh: 1: eval: -s: not found docker.sh: 1: eval: -s: not found docker.sh: 1: eval: -s: not found docker.sh: 1: eval: -s: not found docker.sh: 1: eval: -s: not found docker.sh: 267: .: Can't open /etc/Renviron — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>