duckietown / duckietown-shell

Other
3 stars 4 forks source link

Docker image is out of date. #67

Open david-boles opened 4 years ago

david-boles commented 4 years ago

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 commented 4 years ago

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

AndreaCensi commented 4 years ago

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

afdaniele commented 4 years ago

@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 commented 4 years ago

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

jasonhu5 commented 4 years ago

@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 commented 4 years ago

@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).