angelolab / ark-analysis

Integrated pipeline for multiplexed image analysis
https://ark-analysis.readthedocs.io/en/latest/
MIT License
73 stars 26 forks source link

Running the script to get the jupyter session open URL link_Unable to mount #444

Closed Kwokim closed 2 years ago

Kwokim commented 3 years ago

Please refer to our FAQ and look at our known issues before opening a new issue

What are you trying to do? A clear and concise description of what script or function you're using ./start_docker.sh What is the problem? A clear and concise description of what issue you're running into. $ ./start_docker.sh docker: Error response from daemon: OCI runtime create failed: invalid mount {Destination:\Program Files\Git\usr\local\lib\python3.6\site-packages\ark Type:bind Source:/run/desktop/mnt/host/c/Users/kwoki/ark-analysis/ark;C Options:[rbind rprivate]}: mount destination \Program Files\Git\usr\local\lib\python3.6\site-packages\ark not absolute: unknown.

What have you tried so far? A clear and concise description of what steps you've taken to try and address the problem. Rerunning back from: cd ark-analysis docker build -t ark-analysis

Additional context Add any other context or screenshots here. I changed the script file previously on "start_docker.sh" from line ~20 "docker run -it \" to "docker run -t \" for tty format

This was because previously i got this: $ ./start_docker.sh the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'

ngreenwald commented 3 years ago

@ackagel looks like a windows issue. Can you take a look? @Kwokim, while we look into this, you can set up the environment with Conda instead

Kwokim commented 3 years ago

Sure thing,

How do I set up the environment with Conda? Will this be miniConda or Anaconda for installation as well?

ngreenwald commented 3 years ago

See here for general conda instructions: https://ark-analysis.readthedocs.io/en/latest/_rtd/development.html

ackagel commented 3 years ago

I think this has to do with paths being 'ambiguous' for bash scripts running in window's git-bash. I've seen work-arounds which set the environment variable,export MSYS_NO_PATHCONV=1 before running the docker.

Try adding that to the start_docker.sh file just before line ~20.

Kwokim commented 3 years ago

Hello,

I have attached the txt file after downloading anaconda and going through the steps for installing. Couple of things I saw in the installation process:

  1. $ is not recognized? I took this out and then "git" as a command was not recognized
  2. Docker does show ark analysis is "in use" after using the

cd ark-analysis docker build -t ark-analysis

This was added to ~line 20 but unknown if this solves the problem since the code language was incorrect? export MSYS_NO_PATHCONV=1

Best

Dr. Kwok (Chris) Wai Im, PhD Dr. Matthew Krummel Laboratory University of California San Francisco 513 Parnassus Avenue Room HSW-518. Box 0511 San Francisco, CA 94143-0511 469-288-6402


From: vacuous_planet @.> Sent: Monday, August 16, 2021 5:31 PM To: angelolab/ark-analysis @.> Cc: Im, Kwok W @.>; Mention @.> Subject: Re: [angelolab/ark-analysis] Running the script to get the jupyter session open URL link_Unable to mount (#444)

I think this has to do with paths being 'ambiguous' for bash scripts running in window's git-bash. I've seen a work-arounds which set the environment variable,export MSYS_NO_PATHCONV=1 before running the docker. Try adding that to the ‍ ‍ ‍ ‍ ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd

I think this has to do with paths being 'ambiguous' for bash scripts running in window's git-bash. I've seen a work-arounds which set the environment variable,export MSYS_NO_PATHCONV=1 before running the docker.

Try adding that to the start_docker.sh file just before line ~20.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/angelolab/ark-analysis/issues/444*issuecomment-899906173__;Iw!!LQC6Cpwp!5Fwsqz1WEdqb1RW4Q02z6hvVRFaM1uFFkue_4jbtpMZM5GcS7Vt5Tw3QZrhSvRuT$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AVEU2WVDFMLDTSWTSNRXEH3T5GUW7ANCNFSM5CEBSZNA__;!!LQC6Cpwp!5Fwsqz1WEdqb1RW4Q02z6hvVRFaM1uFFkue_4jbtpMZM5GcS7Vt5Tw3QZlIl5ySx$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!LQC6Cpwp!5Fwsqz1WEdqb1RW4Q02z6hvVRFaM1uFFkue_4jbtpMZM5GcS7Vt5Tw3QZgOs18Ge$ or Androidhttps://urldefense.com/v3/__https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email__;!!LQC6Cpwp!5Fwsqz1WEdqb1RW4Q02z6hvVRFaM1uFFkue_4jbtpMZM5GcS7Vt5Tw3QZn2Vs1jY$.

(base) C:\Users\kwoki>$ git clone https://github.com/angelolab/ark-analysis.git '$' is not recognized as an internal or external command, operable program or batch file.

(base) C:\Users\kwoki>git clone https://github.com/angelolab/ark-analysis.git 'git' is not recognized as an internal or external command, operable program or batch file.

(base) C:\Users\kwoki>cd ark-analysis

(base) C:\Users\kwoki\ark-analysis>docker build -t ark-analysis "docker build" requires exactly 1 argument. See 'docker build --help'.

Usage: docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

(base) C:\Users\kwoki\ark-analysis>docker build -t ark-analysis . [+] Building 1.0s (12/12) FINISHED => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 35B 0.0s => [internal] load metadata for docker.io/library/python:3.6 0.8s => [1/7] FROM @.***:16db3d0d99c29457591251df9093ffa038f9d1658ca0b0f10ac210d6d36034 0.0s => [internal] load build context 0.0s => => transferring context: 2.47kB 0.0s => CACHED [2/7] RUN apt-get update && apt-get install -y gcc 0.0s => CACHED [3/7] WORKDIR /scripts 0.0s => CACHED [4/7] COPY setup.py requirements.txt README.md /opt/ark-analysis/ 0.0s => CACHED [5/7] RUN pip install -r /opt/ark-analysis/requirements.txt 0.0s => CACHED [6/7] COPY ark /opt/ark-analysis/ark 0.0s => CACHED [7/7] RUN pip install /opt/ark-analysis 0.0s => exporting to image 0.1s => => exporting layers 0.0s => => writing image sha256:9d43b51ac73fc18d55bbe4c6737d8a872e182e7a9ca2e50afb5aeb9417e91c80 0.0s => => naming to docker.io/library/ark-analysis 0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them

(base) C:\Users\kwoki\ark-analysis>./start_docker.sh '.' is not recognized as an internal or external command, operable program or batch file.

ackagel commented 3 years ago

The default 'Anaconda Prompt' on Windows doesn't support bash scripts, so the install process would not work. Try using the same export MSYS_NO_PATHCONV=1 fix, but run the installation process via git-bash (the previous terminal/shell/command-line you were using). If this still doesn't work, the conda installation method (which, to clarify, is an alternative to the docker method) goes as follows:

From the 'Anaconda Prompt', these commands should successfully install ark-analysis:

To then run the jupyter lab/notebooks, run:

python -m jupyter lab --ip=0.0.0.0 --allow-root --no-browser --port=8888

and open the provided url in your browser.

ngreenwald commented 3 years ago

@ackagel will you open a PR to modify readme to 1) state that '$' is the interpreter for Mac and is used to indicate what code needs to be entered, users should actually type it and 2) the period needs to be included in the docker build -t command?

Kwokim commented 3 years ago

Hi sorry for my inexperience,

I am stuck on the line in conda:

To do so, on your command line, type conda create -n python=3.6, where is a name you set. Our codebase only supports Python 3.6, so please do not change the python=3.6 flag when creating your environment.

The "" is supposed to be what name? Is this the file directory path to the folder?

Best

Dr. Kwok (Chris) Wai Im, PhD Dr. Matthew Krummel Laboratory University of California San Francisco 513 Parnassus Avenue Room HSW-518. Box 0511 San Francisco, CA 94143-0511 469-288-6402


From: Noah F. Greenwald @.> Sent: Tuesday, August 17, 2021 12:28 PM To: angelolab/ark-analysis @.> Cc: Im, Kwok W @.>; Mention @.> Subject: Re: [angelolab/ark-analysis] Running the script to get the jupyter session open URL link_Unable to mount (#444)

@ackagel will you open a PR to modify readme to 1) state that '$' is the interpreter for Mac and is used to indicate what code needs to be entered, users should actually type it and 2) the period needs to be included in the docker build -t ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd

@ackagelhttps://urldefense.com/v3/__https://github.com/ackagel__;!!LQC6Cpwp!6d5C8Mhg58c0eMSB_7yPdVFyiXBGo_IHKQUosGaJBeFhS4K9pPTAjhUXSzpP1oi-$ will you open a PR to modify readme to 1) state that '$' is the interpreter for Mac and is used to indicate what code needs to be entered, users should actually type it and 2) the period needs to be included in the docker build -t command?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/angelolab/ark-analysis/issues/444*issuecomment-900571922__;Iw!!LQC6Cpwp!6d5C8Mhg58c0eMSB_7yPdVFyiXBGo_IHKQUosGaJBeFhS4K9pPTAjhUXS5WziO5z$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AVEU2WVHQ3ZBY3F65U3V22DT5KZ6BANCNFSM5CEBSZNA__;!!LQC6Cpwp!6d5C8Mhg58c0eMSB_7yPdVFyiXBGo_IHKQUosGaJBeFhS4K9pPTAjhUXS5IgOVYP$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!LQC6Cpwp!6d5C8Mhg58c0eMSB_7yPdVFyiXBGo_IHKQUosGaJBeFhS4K9pPTAjhUXS0cRvD3v$ or Androidhttps://urldefense.com/v3/__https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email__;!!LQC6Cpwp!6d5C8Mhg58c0eMSB_7yPdVFyiXBGo_IHKQUosGaJBeFhS4K9pPTAjhUXS9hSGjRH$.

Kwokim commented 3 years ago

Sorry,

I figured that out. I have the ark setup downloaded and ark-analysis is listed. However when i run the command "import ark":

'import' is not recognized as an internal or external command, operable program or batch file.

Best

Dr. Kwok (Chris) Wai Im, PhD Dr. Matthew Krummel Laboratory University of California San Francisco 513 Parnassus Avenue Room HSW-518. Box 0511 San Francisco, CA 94143-0511 469-288-6402


From: Im, Kwok W @.> Sent: Friday, August 20, 2021 6:39 PM To: angelolab/ark-analysis @.>; angelolab/ark-analysis @.> Cc: Mention @.> Subject: Re: [angelolab/ark-analysis] Running the script to get the jupyter session open URL link_Unable to mount (#444)

Hi sorry for my inexperience,

I am stuck on the line in conda:

To do so, on your command line, type conda create -n python=3.6, where is a name you set. Our codebase only supports Python 3.6, so please do not change the python=3.6 flag when creating your environment.

The "" is supposed to be what name? Is this the file directory path to the folder?

Best

Dr. Kwok (Chris) Wai Im, PhD Dr. Matthew Krummel Laboratory University of California San Francisco 513 Parnassus Avenue Room HSW-518. Box 0511 San Francisco, CA 94143-0511 469-288-6402


From: Noah F. Greenwald @.> Sent: Tuesday, August 17, 2021 12:28 PM To: angelolab/ark-analysis @.> Cc: Im, Kwok W @.>; Mention @.> Subject: Re: [angelolab/ark-analysis] Running the script to get the jupyter session open URL link_Unable to mount (#444)

@ackagel will you open a PR to modify readme to 1) state that '$' is the interpreter for Mac and is used to indicate what code needs to be entered, users should actually type it and 2) the period needs to be included in the docker build -t ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd

@ackagelhttps://urldefense.com/v3/__https://github.com/ackagel__;!!LQC6Cpwp!6d5C8Mhg58c0eMSB_7yPdVFyiXBGo_IHKQUosGaJBeFhS4K9pPTAjhUXSzpP1oi-$ will you open a PR to modify readme to 1) state that '$' is the interpreter for Mac and is used to indicate what code needs to be entered, users should actually type it and 2) the period needs to be included in the docker build -t command?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/angelolab/ark-analysis/issues/444*issuecomment-900571922__;Iw!!LQC6Cpwp!6d5C8Mhg58c0eMSB_7yPdVFyiXBGo_IHKQUosGaJBeFhS4K9pPTAjhUXS5WziO5z$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AVEU2WVHQ3ZBY3F65U3V22DT5KZ6BANCNFSM5CEBSZNA__;!!LQC6Cpwp!6d5C8Mhg58c0eMSB_7yPdVFyiXBGo_IHKQUosGaJBeFhS4K9pPTAjhUXS5IgOVYP$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!LQC6Cpwp!6d5C8Mhg58c0eMSB_7yPdVFyiXBGo_IHKQUosGaJBeFhS4K9pPTAjhUXS0cRvD3v$ or Androidhttps://urldefense.com/v3/__https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email__;!!LQC6Cpwp!6d5C8Mhg58c0eMSB_7yPdVFyiXBGo_IHKQUosGaJBeFhS4K9pPTAjhUXS9hSGjRH$.