Skip to content

Commit

Permalink
reduced the size of the Dockerfile and updated docs. Currently, Chron…
Browse files Browse the repository at this point in the history
…o is not in Dockerfile.
  • Loading branch information
huckl3b3rry87 committed Jun 18, 2018
1 parent b4ccbb5 commit a7afb94
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ git clone https://github.com/JuliaMPC/MAVs
```
Then follow the [Docker instructions](https://github.com/JuliaMPC/MAVs/tree/master/docker#mavs-docker).

* Note: currently, the entire repo is cloned twice (once by the above command and once by the Docker file).
* In the future this software may be configured to save space and only cloned once

After this, to test the software:
### Mitigate this issue
Something like this may appear:
Expand All @@ -36,10 +39,10 @@ While [this issue](https://github.com/jdlangs/RobotOS.jl/issues/45) needs to be
```
sudo rm -r /home/mavs/.julia/.cache
```
This issue happens frequently, so just run the avove command each time after ``run.sh`` is ran.
This issue happens frequently, so just run the above command is there is a cache error from julia. Then rerun.
### Run some of the system demos
The demos are included in the documetnation, for instance try [demoA](https://juliampc.github.io/AVExamples.jl/latest/demos/system/demoA.html).
The demos are included in the documentation, for instance try [demoA](https://juliampc.github.io/AVExamples.jl/latest/demos/system/demoA.html).
## Requirements
Expand Down
23 changes: 15 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ RUN echo "deb http://packages.osrfoundation.org/gazebo/ubuntu `lsb_release -cs`
ros-kinetic-hector-slam \
ros-kinetic-joy \
ros-kinetic-perception-pcl \
ros-kinetic-velodyne-description \
# for obstacle_detector
libarmadillo-dev \
&& apt-get clean

# Install Julia and setup environment
RUN sudo wget https://julialang-s3.julialang.org/bin/linux/x64/0.6/julia-0.6.2-linux-x86_64.tar.gz \
&& sudo tar -xvf julia-0.6.2-linux-x86_64.tar.gz -C /opt
#TODO, delete julia .tar file

# Add basic user
ENV USERNAME mavs
ENV PULSE_SERVER /run/pulse/native
Expand All @@ -51,18 +57,19 @@ RUN echo "source /opt/ros/kinetic/setup.bash" >> /home/$USERNAME/.bashrc && \
# Change user
USER mavs

RUN echo 4
RUN /opt/julia-d386e40c17/bin/julia -e 'Pkg.add("MichiganAutonomousVehicles")'
RUN git clone -b master https://github.com/JuliaMPC/MAVs /home/$USERNAME/MAVs

RUN echo 3

RUN /bin/bash -c 'source /opt/ros/kinetic/setup.bash; cd /home/$USERNAME/MAVs/ros/src; catkin_init_workspace; cd ..; catkin_make'
RUN echo "source /home/$USERNAME/MAVs/ros/devel/setup.bash" >> /home/$USERNAME/.bashrc
RUN echo "source /home/$USERNAME/MAVs/ros/devel/setup.bash" >> /home/$USERNAME/.bashrc && \
echo 'alias julia='/opt/julia-d386e40c17/bin/julia'' >> ~/.bashrc && \
echo 'export PATH="$PATH:/opt/julia-d386e40c17/bin"' >> ~/.bashrc

#RUN echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc \
#&& /bin/bash -c 'cd /home/$USERNAME/MAVs/ros/src; cd .. \
#rosdep install --from-paths src --ignore-src --rosdistro kinetic -y \
#catkin_make' \
#&& echo "source /home/$USERNAME/MAVs/ros/devel/setup.bash" >> /home/$USERNAME/.bashrc

# RUN sudo rm -r /home/mavs/.julia/.cache

# Default CMD
CMD ["/bin/bash"]

#CMD ["/bin/bash", "bash -c '[ -d /home/mavs/.julia/.cache] && sudo rm -rf /home/mavs/.julia/.cache'"]
10 changes: 6 additions & 4 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# MAVs Docker
Assuming the NVIDIA drivers and Docker and nvidia-docker are properly
installed.

[Docker installation](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/)
## Requirements

Tested on Ubuntu Xenial (16.04)

[nvidia-docker installation](https://github.com/NVIDIA/nvidia-docker)
* An X server
* [Docker](https://www.docker.com/get-docker)
* [nvidia-docker](https://github.com/NVIDIA/nvidia-docker/wiki/Installation)

## How to build

```
$ cd MAVs/docker
$ sh build.sh
Expand Down

0 comments on commit a7afb94

Please sign in to comment.