-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker file won´t built a working image #80
Comments
The last commands I had commented were wrong. It was before I figured out how SHELL works. I've updated the file, can you download and retry? https://github.com/noaa-ocs-hydrography/kluster/blob/kluster_0_8_9/dockerfile |
It still doesn´t work : executor failed running [conda run -n kluster_test /bin/bash -c python -m HSTB.kluster]: exit code: 1 (base) PS C:\Users\monoc\Downloads> docker build -t kluster089 . [+] Building 60.4s (21/21) FINISHED
executor failed running [conda run -n kluster_test /bin/bash -c python -m HSTB.kluster]: exit code: 1 |
I believe this is actually sort of working. The last command in the dockerfile is 'python -m HSTB.kluster' which starts the GUI. That fails in 'headless' mode as it has determined that you don't have any graphics capability. This is as far as I have gotten with Docker. If there is some way to run the GUI in Docker, I am not aware of it. I probably should have commented that last line. But I think you can at least run the processing with the container as is, outside of the GUI. |
Not sure that I got the docker image right, Once, within the docker container command line, I cannot import any library. The same if using an IDE. |
@monocilindro I believe this might be do to the environment not being activated. I've committed a change to the dockerfile (not sure which version you have tried) and I'll show you how I use it at least. I'll add this to the docs as well. Building the image
Running in interactive mode
Importing
|
Maybe the GUI could work using the docker image by following the guide made by the MBsystem developing team for running their software in Windows 11. I have adapted the launcher (sh file) accordingly but still is not loading the main menu |
@monocilindro based on my googling, it appears this is related to not having a graphics driver in the dockerimage. See here. We could alter the dockerfile to install during the build. I believe you could also try installing after starting the docker container. I can look at this after I finish my current task. |
Hi, first of all, thank you for this piece of software! It was missing! I got the main UI working with the following docker file: FROM nvidia/cuda:11.7.1-devel-ubuntu20.04
LABEL maintainer="[email protected]"
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get -y dist-upgrade
RUN apt-get install -y software-properties-common
RUN apt-get update && apt-get -y dist-upgrade
RUN add-apt-repository ppa:ubuntugis/ppa
RUN apt-get update && apt-get -y dist-upgrade
RUN apt install -y mesa-utils xserver-xorg-video-all nvidia-common kmod x11-apps wget
# download from NVIDIA or install from a debian repository
# COPY NVIDIA-Linux-x86_64-515.43.04.run .
RUN wget https://us.download.nvidia.com/XFree86/Linux-x86_64/515.43.04/NVIDIA-Linux-x86_64-515.43.04.run
RUN /bin/sh NVIDIA-Linux-x86_64-515.43.04.run -a -s --no-kernel-module --install-libglvnd || \
cat /var/log/nvidia-installer.log
RUN apt-get install -y qgis \
libqgis-dev \
python3-qgis \
python3-vispy \
python3-qtpy \
python3-pyside2.* \
libgdal-dev \
python3-pip \
build-essential \
gfortran \
cmake \
git \
nano \
python3-h5py
RUN pip install geohash
RUN python3 --version
RUN pip install git+https://github.com/epifanio/kluster.git#egg=hstb.kluster
I am using Nvidia-docker as I needed some GPU processing and I am installing the exact same video driver as the one installed on the host machine. The same dockerfile should work also starting from a standard ubuntu-20.04 image and installing the video driver directly from the debian repository (as long as they are the same drivers available on the host machine. (this should work at least for a linux host, but probably fine also for a docker running under WSL2 and win 11) I run the container via docker compose with :
before running docker-compose run: |
This is great Massimo! Would you be comfortable with committing this new dockerfile, or updating the existing one? |
Thanks @ericgyounkin - I will clean up my fork and make a PR from a dedicated branch. |
I cannot build the docker image using the docker file located in the root folder. It seems that the last 2 lines, besides uncommenting, need changing "conda run" for "RUN conda". But after it and when trying to build the docker image from get docker file, I am getting this error
executor failed running [conda run -n kluster_test /bin/bash -c conda -n kluster_test pip install git+https://github.com/noaa-ocs-hydrography/kluster.git#egg=hstb.kluster]: exit code: 1
See the log
(base) PS C:\Users\monoc\Downloads\kluster-kluster_0_8_9> docker build -t kluster089 .
[+] Building 1.4s (19/20)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.89kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:18.04 0.8s
=> [ 1/17] FROM docker.io/library/ubuntu:18.04@sha256:c2aa13782650aa7ade424b12008128b60034c795f25456e8eb552d0a0f447cad 0.0s
=> CACHED [ 2/17] RUN apt-get update 0.0s
=> CACHED [ 3/17] RUN apt-get install -y git 0.0s
=> CACHED [ 4/17] RUN apt-get install -y wget 0.0s
=> CACHED [ 5/17] RUN apt install libgl1-mesa-glx -y 0.0s
=> CACHED [ 6/17] RUN apt-get install ffmpeg libsm6 libxext6 -y 0.0s
=> CACHED [ 7/17] RUN adduser --disabled-password --gecos "Non-root user" --uid 1000 --gid 100 --home /ho 0.0s
=> CACHED [ 8/17] RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh -O ~/minico 0.0s
=> CACHED [ 9/17] RUN echo ". /home/eyou102/miniconda3/etc/profile.d/conda.sh" >> ~/.profile 0.0s
=> CACHED [10/17] RUN conda init bash 0.0s
=> CACHED [11/17] RUN mkdir /home/eyou102/kluster 0.0s
=> CACHED [12/17] WORKDIR /home/eyou102/kluster 0.0s
=> CACHED [13/17] RUN conda update --name base --channel defaults conda 0.0s
=> CACHED [14/17] RUN conda create -n kluster_test python=3.8.12 0.0s
=> CACHED [15/17] RUN conda install -c conda-forge qgis=3.18.3 vispy=0.9.4 pyside2=5.13.2 gdal=3.3.1 h5py python-geohash 0.0s
=> ERROR [16/17] RUN conda -n kluster_test pip install git+https://github.com/noaa-ocs-hydrography/kluster.git#egg=hstb.k 0.6s
[16/17] RUN conda -n kluster_test pip install git+https://github.com/noaa-ocs-hydrography/kluster.git#egg=hstb.kluster:
#19 0.540 ERROR conda.cli.main_run:execute(33): Subprocess for 'conda run ['/bin/bash', '-c', 'conda -n kluster_test pip install git+https://github.com/noaa-ocs-hydrography/kluster.git#egg=hstb.kluster']' command failed. (See above for error)
#19 0.540
#19 0.540 CommandNotFoundError: No command 'conda kluster_test'.
#19 0.540
#19 0.540
executor failed running [conda run -n kluster_test /bin/bash -c conda -n kluster_test pip install git+https://github.com/noaa-ocs-hydrography/kluster.git#egg=hstb.kluster]: exit code: 1
The text was updated successfully, but these errors were encountered: