schienstockd / ceceliaDocker

Dockerised version of Cecelia
https://github.com/schienstockd/cecelia
GNU General Public License v3.0
0 stars 0 forks source link

Windows installation #1

Open smith6jt-cop opened 2 months ago

smith6jt-cop commented 2 months ago

Hello,

I am trying to install on a Windows 10 machine. I have:

(base) C:\Users\smith6jt\ceceliaDocker>where java C:\Program Files (x86)\Java\jdk1.8.0_202\bin\java.exe

(base) C:\Users\smith6jt\ceceliaDocker>java -version java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) Client VM (build 25.202-b08, mixed mode)

(base) C:\Users\smith6jt\ceceliaDocker>cl.exe Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

With: (base) C:\Users\smith6jt\ceceliaDocker>conda env create --file=conda-gui-env.yml

I get:

Channels:

Downloading and Extracting Packages:

Preparing transaction: done Verifying transaction: done Executing transaction: done Installing pip dependencies: | Ran pip subprocess with arguments: ['C:\Users\smith6jt\AppData\Local\miniconda3\envs\r-cecelia-gui-env\python.exe', '-m', 'pip', 'install', '-U', '-r', 'C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt', '--exists-action=b'] Pip subprocess output: Collecting python-bioformats (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 1)) Using cached python_bioformats-4.0.7-py3-none-any.whl.metadata (1.7 kB) Collecting jupyter (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 2)) Using cached jupyter-1.0.0-py2.py3-none-any.whl.metadata (995 bytes) Collecting napari-animation (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 4)) Using cached napari_animation-0.0.8-py3-none-any.whl.metadata (10 kB) Collecting apoc (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 5)) Using cached apoc-0.12.0-py3-none-any.whl.metadata (8.1 kB) Collecting napari-accelerated-pixel-and-object-classification (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 6)) Using cached napari_accelerated_pixel_and_object_classification-0.14.1-py3-none-any.whl.metadata (25 kB) Collecting h5py (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 7)) Using cached h5py-3.11.0-cp39-cp39-win_amd64.whl.metadata (2.5 kB) Collecting scikit-image (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 8)) Using cached scikit_image-0.22.0-cp39-cp39-win_amd64.whl.metadata (13 kB) Collecting scanpy (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 9)) Using cached scanpy-1.10.1-py3-none-any.whl.metadata (8.6 kB) Collecting zarr (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 10)) Using cached zarr-2.17.2-py3-none-any.whl.metadata (5.7 kB) Collecting dask (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 11)) Using cached dask-2024.5.0-py3-none-any.whl.metadata (3.8 kB) Collecting anndata (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 12)) Using cached anndata-0.10.7-py3-none-any.whl.metadata (6.6 kB) Collecting tifffile (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 13)) Using cached tifffile-2024.5.3-py3-none-any.whl.metadata (31 kB) Collecting shapely (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 14)) Using cached shapely-2.0.4-cp39-cp39-win_amd64.whl.metadata (7.2 kB) Requirement already satisfied: pip in c:\users\smith6jt\appdata\local\miniconda3\envs\r-cecelia-gui-env\lib\site-packages (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 15)) (24.0) Collecting pyopencl (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 16)) Using cached pyopencl-2024.2-cp39-cp39-win_amd64.whl.metadata (4.7 kB) Collecting pandas (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 17)) Using cached pandas-2.2.2-cp39-cp39-win_amd64.whl.metadata (19 kB) Collecting trimesh (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 18)) Using cached trimesh-4.3.2-py3-none-any.whl.metadata (18 kB) Collecting ome-types (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 19)) Using cached ome_types-0.5.1.post1-py3-none-any.whl.metadata (10 kB) Collecting napari[all] (from -r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 3)) Using cached napari-0.4.19.post1-py3-none-any.whl.metadata (15 kB) Collecting boto3>=1.14.23 (from python-bioformats->-r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 1)) Using cached boto3-1.34.98-py3-none-any.whl.metadata (6.6 kB) Collecting future>=0.18.2 (from python-bioformats->-r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 1)) Using cached future-1.0.0-py3-none-any.whl.metadata (4.0 kB) Collecting python-javabridge==4.0.3 (from python-bioformats->-r C:\Users\smith6jt\ceceliaDocker\condaenv.fx_1qrnp.requirements.txt (line 1)) Using cached python-javabridge-4.0.3.tar.gz (1.3 MB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'error'

Pip subprocess error: error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [10 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\smith6jt\AppData\Local\Temp\pip-install-vhm1fwaf\python-javabridge_6a5df2cdb5654438b923f17d3d17854c\setup.py", line 412, in ext_modules=ext_modules(), File "C:\Users\smith6jt\AppData\Local\Temp\pip-install-vhm1fwaf\python-javabridge_6a5df2cdb5654438b923f17d3d17854c\setup.py", line 99, in ext_modules jdk_home = find_jdk() File "C:\Users\smith6jt\AppData\Local\Temp\pip-install-vhm1fwaf\python-javabridge_6a5df2cdb5654438b923f17d3d17854c\javabridge\locate.py", line 222, in find_jdk raise RuntimeError( RuntimeError: Failed to find the Java Development Kit. Please download and install the Oracle JDK 1.6 or later [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

failed

CondaEnvException: Pip failed

Any suggestions?

schienstockd commented 2 months ago

Thanks @smith6jt-cop for giving it a go!

The python-bioformats requirement is actually obsolete. I have updated the conda-gui-env.yml by deleting - python-bioformats==4.0.6.

Let me know if that runs through now or whether anything else comes up.

smith6jt-cop commented 2 months ago

Great! That worked. I added '\AppData\Local' to CONDA_DIR in the .bat file and the build started. However:

-cecelia-gui-env) C:\Users\smith6jt\ceceliaDocker>.\cecelia-Windows-docker.bat ">> START Cecelia"

Remove connection files wait for kernel... Start IPython NOTE: When using the ipython kernel entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending "quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049

To connect another client to this kernel, use: --existing C:\Users\smith6jt\ceceliaDocker\datashare\connectionFile.debug.json

OK wait for docker... Start Docker time="2024-05-07T17:41:34-04:00" level=warning msg="C:\Users\smith6jt\ceceliaDocker\docker-compose.yml: version is obsolete" [+] Building 454.8s (14/31) docker:default => [app internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 4.75kB 0.0s => [app internal] load metadata for docker.io/rocker/ml:4.2.0 2.5s => [app auth] rocker/ml:pull token for registry-1.docker.io 0.0s => [app internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [app 1/25] FROM docker.io/rocker/ml:4.2.0@sha256:2709a6dfb96a99e704f5dba5ccf37b06f954732da81eec8a13636c0c9bdf4fa5 53.2s => => resolve docker.io/rocker/ml:4.2.0@sha256:2709a6dfb96a99e704f5dba5ccf37b06f954732da81eec8a13636c0c9bdf4fa5 0.0s => => sha256:ce20859e311a069b1d992579308c53dd2698926568618cf5f7d9292c04c20f83 249.60MB / 249.60MB 6.6s => => sha256:eabb737513a77189f0357cce2129c8abfc8ffdf0a3145be867d50954710e4d00 2.40kB / 2.40kB 0.0s => => sha256:ca1778b6935686ad781c27472c4668fc61ec3aeb85494f72deb1921892b9d39e 27.50MB / 27.50MB 0.7s => => sha256:2709a6dfb96a99e704f5dba5ccf37b06f954732da81eec8a13636c0c9bdf4fa5 856B / 856B 0.0s => => sha256:10f96d1e7c5d4001ccbdf9409420b4852afbf395d4f1b5c243a42aa1249107f9 10.93kB / 10.93kB 0.0s => => sha256:27b3a899dc607f48c9529f0deac683b3a991a9bcc2c4e4e66292153da780f8dc 1.81kB / 1.81kB 0.3s => => sha256:797c26133c034db6713d4acbbec84b00a63a6e9113bd740a2cb17dc7589cd363 20.48kB / 20.48kB 0.5s => => sha256:1729a9b492b12ff186f02c3e0629ebd32ee3e6df8ae9526a286698ef109b6b1a 37.94MB / 37.94MB 1.9s => => sha256:3ac10cda08513eb1bf8474b8b23f7af0d9d64248bba66469d761b23ac2a867b7 1.22GB / 1.22GB 36.5s => => extracting sha256:ca1778b6935686ad781c27472c4668fc61ec3aeb85494f72deb1921892b9d39e 0.9s => => extracting sha256:27b3a899dc607f48c9529f0deac683b3a991a9bcc2c4e4e66292153da780f8dc 0.0s => => sha256:5fc9d8e6cec0fa50f39a2c2eb7df9364895e5ad8f63928110b55fbbf7664a3a2 552B / 552B 2.2s => => sha256:51abb722f86eebb413c1851c633c0ea5ddaf98f2c084bfde3a355abe6db9f86c 23.39MB / 23.39MB 3.2s => => sha256:3542ae1f557d6151ac01305c7c34fa071855b974322e85624e779637a04471ac 215.95MB / 215.95MB 11.6s => => extracting sha256:ce20859e311a069b1d992579308c53dd2698926568618cf5f7d9292c04c20f83 6.0s => => sha256:24d87e4798441e93c79e146e2641a6bfebc9bc1b7a0750b8bf9f027968fda3d9 26.75kB / 26.75kB 6.9s => => sha256:2eaea9c1db6aad1184aaee5c890c200a447af9b930e14446dfdb4866a7653132 145.93MB / 145.93MB 13.1s => => extracting sha256:797c26133c034db6713d4acbbec84b00a63a6e9113bd740a2cb17dc7589cd363 0.0s => => extracting sha256:1729a9b492b12ff186f02c3e0629ebd32ee3e6df8ae9526a286698ef109b6b1a 0.8s => => extracting sha256:3ac10cda08513eb1bf8474b8b23f7af0d9d64248bba66469d761b23ac2a867b7 9.9s => => extracting sha256:5fc9d8e6cec0fa50f39a2c2eb7df9364895e5ad8f63928110b55fbbf7664a3a2 0.0s => => extracting sha256:51abb722f86eebb413c1851c633c0ea5ddaf98f2c084bfde3a355abe6db9f86c 0.7s => => extracting sha256:3542ae1f557d6151ac01305c7c34fa071855b974322e85624e779637a04471ac 3.4s => => extracting sha256:24d87e4798441e93c79e146e2641a6bfebc9bc1b7a0750b8bf9f027968fda3d9 0.0s => => extracting sha256:2eaea9c1db6aad1184aaee5c890c200a447af9b930e14446dfdb4866a7653132 2.2s => [app 24/25] ADD https://api.github.com/repos/schienstockd/cecelia/commits?per_page=1 skipcache 0.2s => [app internal] load build context 0.0s => => transferring context: 1.81kB 0.0s => [app 2/25] RUN apt-get update && apt-get install -y sudo gdebi-core pandoc pandoc-citeproc libcurl4-gnutls-dev 36.8s => [app 3/25] RUN useradd -ms /bin/bash shiny 0.2s => [app 4/25] RUN mkdir /opt/tools && chown shiny:shiny /opt/tools 0.4s => [app 5/25] RUN mkdir -p /usr/local/lib/R/site-library && chmod 777 -R /usr/local/lib/R/site-library 6.7s => [app 6/25] RUN R -e 'if (!require("remotes", quietly = TRUE)) install.packages("remotes", repos = "https://cloud.r-project.org")' 0.5s => [app 7/25] RUN R -e 'remotes::install_github("schienstockd/cecelia", Ncpus = 4, repos = "https://cloud.r-project.org", upgrade = " 354.1s => ERROR [app 8/25] RUN R -e 'cecelia::cciaAppRequirements(repos = "https://cloud.r-project.org")' 0.4s

[app 8/25] RUN R -e 'cecelia::cciaAppRequirements(repos = "https://cloud.r-project.org")': 0.301 0.301 R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics" 0.301 Copyright (C) 2022 The R Foundation for Statistical Computing 0.301 Platform: x86_64-pc-linux-gnu (64-bit) 0.301 0.301 R is free software and comes with ABSOLUTELY NO WARRANTY. 0.301 You are welcome to redistribute it under certain conditions. 0.301 Type 'license()' or 'licence()' for distribution details. 0.301 0.301 Natural language support but running in an English locale 0.301 0.301 R is a collaborative project with many contributors. 0.301 Type 'contributors()' for more information and 0.301 'citation()' on how to cite R or R packages in publications. 0.301 0.301 Type 'demo()' for some demos, 'help()' for on-line help, or 0.301 'help.start()' for an HTML browser interface to help. 0.301 Type 'q()' to quit R. 0.301 0.349 > cecelia::cciaAppRequirements(repos = "https://cloud.r-project.org") 0.350 Error in loadNamespace(x) : there is no package called ‘cecelia’ 0.350 Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart 0.350 Execution halted

failed to solve: process "/bin/sh -c R -e 'cecelia::cciaAppRequirements(repos = \"https://cloud.r-project.org\")'" did not complete successfully: exit code: 1

image

schienstockd commented 2 months ago

OK - I had to update some of the package installations in the main R-package. Can you run docker builder prune to remove the build cache and then try to run again?

smith6jt-cop commented 2 months ago

I followed your instructions, but the build errors out at the same spot.

schienstockd commented 2 months ago

The only other thing that I changed was to update the Dockerfile in the ccia folder. I changed FROM rocker/ml:4.2.0 to FROM rocker/ml:4.4.0 to upgrade the R version. I think that was also part of the issue.

If that doesn't work - I am currently uploading a Docker image to Docker Hub so there might be no need to build the image from scratch: https://hub.docker.com/repository/docker/schienstockd/cecelia/general

schienstockd commented 1 month ago

In case this is still relevant, I have updated the Docker image on Dockerhub and can now be pulled with FROM schienstockd/cecelia:latest in the Dockerfile. The github repository should have this as default now, so there should be no need to build the container yourself.