Skip to content
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 image is out of date. #67

Open
david-boles opened this issue Jul 15, 2020 · 6 comments
Open

Docker image is out of date. #67

david-boles opened this issue Jul 15, 2020 · 6 comments

Comments

@david-boles
Copy link

Running docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -w $PWD -v $PWD:$PWD -v ~/.dt-shell:/root/.dt-shell -v ~/.docker:/root/.docker duckietown/duckietown-shell:latest dts gives:

There is an updated duckietown-shell available.

  You have: 3.0.31

 available: 5.1.6 

You should update the shell using `pip`.        
        
        
Waiting 3 seconds to give you time to read the message.

dts :  duckietown-shell-commands requires Python 3.6 and later.
    :  Detected 2.7.15 (default, Aug 16 2018, 14:17:09) 
    :  [GCC 6.4.0].

dts :  Please report that you are using:
    :  
    :  duckietown-shell: 3.0.31
    :  python: "2.7.15 (default, Aug 16 2018, 14:17:09) \n[GCC 6.4.0]"
@CourchesneA
Copy link

I believe this was an experimental feature that was never officially supported

@AndreaCensi
Copy link
Member

@afdaniele that is a very old version of the shell, right?

@afdaniele
Copy link
Member

@david-boles where did you get the instructions about the duckietown/duckietown-shell image? As @CourchesneA said, it was an experimental feature and it was never officially released. You should install the shell via pip, preferably using PowerShell if on Windows.

@jasonhu5
Copy link
Contributor

@afdaniele They might have got the instructions here: https://hub.docker.com/r/duckietown/duckietown-shell, in the Installation on Docker (experimental) section.

@jasonhu5
Copy link
Contributor

jasonhu5 commented Jul 17, 2020

@david-boles In case you still want to run your command, you may try using my image: jasonhu5/duckietown-shell:latest, I built it with dts 5.1.6. In your original running command, just replace the duckietown/duckietown-shell:latest with mine.

tl;dr Below are the steps I did to create the above image (just for reference). Could have used a Dockerfile, but not sure if all of this is proper.

I figured that the duckietown-shell docker image has python2, so it's not easy to directly use that image to upgrade dts. But luckily, it seems creating a new image is not hard.

For reference, here are the steps I did to create the docker image (with reference to this Dockerfile duckietown/duckietown-shell's Dockerfile on Docker Hub)

  1. On my local machine:
    docker run -it --rm --network host docker:18-dind /bin/sh

  2. Then WITHIN the container:

apk --update --no-cache add \
python3 \
python3-dev \
py3-pip \
bash \
git \
build-base \
musl-dev \
linux-headers

, and then pip3 install -U --user --no-cache-dir duckietown-shell
(The numpy build does take QUITE A WHILE)

  1. Then OUTSIDE of the container:
    docker ps and copy the ID of the above running container.

  2. Finally, also OUTSIDE of the container:
    docker commit -c "ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin" copied_container_ID [repository[:tag]]

@david-boles
Copy link
Author

@jasonhu5 Thanks! We'll try it at some point.

@afdaniele We just got the Docker command from the README. See #66 for why we had trouble running it on Windows directly, though not installing it from Powershell might have been the issue (besides not being able to install docker at all on some computers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants