Giter VIP home page Giter VIP logo

Comments (8)

razrotenberg avatar razrotenberg commented on May 20, 2024 1

Ok thanks for sharing!
I'm closing this issue for now.
We can reopen it any time if you will get this error again 👌

from genv.

InCogNiTo124 avatar InCogNiTo124 commented on May 20, 2024

version: latest

from genv.

razrotenberg avatar razrotenberg commented on May 20, 2024

Hi @InCogNiTo124 !
So sorry for the late reply, truth is that for some reason I wasn't notified about this issue so I just didn't see it 😅
I reran the Docker image and the conda install command.
Then, running genv command works for me so unfortunately I'm unable to reproduce the issue.

I wonder if it was a problem in a previous version of Genv and now it is solved.
Do you mind trying the same thing once again and making sure genv is of version 0.4.0?
You can verify the version using the command conda list | grep genv.

If this still fails, can you run the following commands and share their outputs here:

  1. which genv
  2. type genv
  3. ls -la /opt/conda/bin/genv
  4. ls -la /opt/conda/opt/genv/
  5. conda list | grep genv

Waiting for hearing from you and thanks for reaching out!

from genv.

InCogNiTo124 avatar InCogNiTo124 commented on May 20, 2024

hey @razrotenberg!

Unfortunately the issue persists for me. This is our Dockerfile:

FROM jupyterhub/singleuser:3.1.0
RUN apt update && apt install -y ffmpeg libsm6 libxext6 git
RUN conda install -y -c conda-forge genv jupyterlab_genv

building the image with docker buildx build --no-cache -t singleuser . and accesing JupyterLab through JupyterHub, but it isn't resolved. Here are the command outputs:

msmetko@5ef780f06b03:~/work$ which genv
/opt/conda/bin/genv
msmetko@5ef780f06b03:~/work$ type genv
genv is hashed (/opt/conda/bin/genv)
msmetko@5ef780f06b03:~/work$ ls -la /opt/conda/bin/genv
lrwxrwxrwx 1 root users 24 Jan 13 12:17 /opt/conda/bin/genv -> ../opt/genv/libexec/genv
msmetko@5ef780f06b03:~/work$ ls -la /opt/conda/opt/genv/
total 112
drwxr-sr-x 11 root users  4096 Jan 13 12:17 .
drwxr-sr-x  3 root users  4096 Jan 13 12:17 ..
-rwxrwxr-x  2 root root     68 Dec 22 20:48 .bashrc
drwxr-sr-x  2 root users  4096 Jan 13 12:17 bin
-rw-rw-r--  1 root users  2478 Jan 13 12:17 build_env_setup.sh
-rwxrwxrwx  2 root root    444 Dec 22 20:56 conda_build.sh
drwxr-sr-x  3 root users  4096 Jan 13 12:17 docs
drwxr-sr-x  2 root users  4096 Jan 13 12:17 exe
-rw-rw-r--  2 root root     92 Dec 22 20:48 .flake8
drwxr-sr-x  3 root users  4096 Jan 13 12:17 .github
-rw-rw-r--  2 root root     42 Dec 22 20:48 .gitignore
drwxr-sr-x  2 root users  4096 Jan 13 12:17 images
drwxr-sr-x  2 root users  4096 Jan 13 12:17 libexec
-rw-rw-r--  2 root root  34523 Dec 22 20:48 LICENSE
-rw-rw-r--  2 root root    842 Dec 22 20:56 metadata_conda_debug.yaml
drwxr-sr-x  2 root users  4096 Jan 13 12:17 py
-rw-rw-r--  2 root root   5331 Dec 22 20:48 README.md
drwxr-sr-x  2 root users  4096 Jan 13 12:17 shims
drwxr-sr-x  2 root users  4096 Jan 13 12:17 .vscode
msmetko@5ef780f06b03:~/work$ conda list | grep genv
genv                      0.4.0                ha770c72_0    conda-forge
jupyterlab_genv           0.1.2              pyhd8ed1ab_0    conda-forge

from genv.

InCogNiTo124 avatar InCogNiTo124 commented on May 20, 2024

However, I sort of managed to make it run with this:

msmetko@5ef780f06b03:~/work$ /opt/conda/opt/genv/bin/genv
Usage: genv <command>

Available commands:
    activate      Activate environment
    attach        Attach devices to this environment
    commands      List all available genv commands
    config        Configure this environment
    deactivate    Deactivate environment
    detach        Detach devices from this environment
    devices       Print information of devices
    envs          Print information of active environments
    exec          Run a genv executable
    help          Print this help message
    home          Display the directory containing the configuration of this environment
    init          Add genv support to your shell
    remote        Query genv on remote hosts
    root          Display the root directory where genv is installed
    status        Show status of the current environment

from genv.

razrotenberg avatar razrotenberg commented on May 20, 2024

I'm trying to reproduce what you are seeing.
For some reason I can't build the Docker image with the Dockerfile and command that you shared here 🤷

I have another question though, how do you run the bash inside the container?
I wonder if it's something related to this because part of the Genv installation in Conda is the initialization of the shell.
It might be something with the container entrypoint/command that the shell is not initialized properly.

Can you please try running the following command and then check if genv works properly?

source /opt/conda/etc/conda/activate.d/genv_activate.sh

from genv.

InCogNiTo124 avatar InCogNiTo124 commented on May 20, 2024

Sorry for the delay! Work got in the way ://

Running the command above resulted with:

$ source /opt/conda/etc/conda/activate.d/genv_activate.sh
No such command 'init'

/opt/conda/bin/genv: line 28: genv-help: command not found

from genv.

InCogNiTo124 avatar InCogNiTo124 commented on May 20, 2024

I discovered the problem may be connected to the fact that, while building the image, the commands are run as root, but when the built container is started, we switch it up to another user so permissions get all mixed up. Imma look into it in the future.

from genv.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.