Commit b0d6b01d authored by Colm Ryan's avatar Colm Ryan Committed by GitHub
Browse files

Merge pull request #2 from BBN-Q/python-webserver

Python webserver to host Vivado
parents bb8ff1ca b4d15c2e
......@@ -2,14 +2,15 @@ FROM ubuntu:14.04
MAINTAINER Colm Ryan <cryan@bbn.com>
# build with docker build --build-arg HOST_LOGIN=user@host --rm -t vivado .
# build with docker build --build-arg HOST=host:port --rm -t vivado .
#install dependences for:
# * downloading Vivado (wget)
# * xsim (gcc build-essential to also get make)
# * MIG tool (libglib2.0-0 libsm6 libxi6 libxrender1 libxrandr2 libfreetype6 libfontconfig)
# * CI (git)
RUN apt-get update && apt-get install -y \
wget \
build-essential \
libglib2.0-0 \
libsm6 \
......@@ -20,17 +21,17 @@ RUN apt-get update && apt-get install -y \
libfontconfig \
git
#Copy in config file and ssh private key
# copy in config file
COPY install_config.txt /
COPY id_rsa /
#run the install
ARG HOST_LOGIN
RUN ssh -oStrictHostKeyChecking=no ${HOST_LOGIN} -i id_rsa "cat ~/Downloads/Xilinx_Vivado_SDK_2016.1_0409_1.tar.gz -" | tar xzv && \
# download and run the install
ARG VIVADO_TAR_HOST
RUN echo "Downloading Vivado from ${VIVADO_TAR_HOST}" && \
wget ${VIVADO_TAR_HOST}/Xilinx_Vivado_SDK_2016.1_0409_1.tar.gz -q && \
echo "Extracting Vivado tar file" && \
tar xzf Xilinx_Vivado_SDK_2016.1_0409_1.tar.gz && \
/Xilinx_Vivado_SDK_2016.1_0409_1/xsetup --agree 3rdPartyEULA,WebTalkTerms,XilinxEULA --batch Install --config install_config.txt && \
rm -rf Xilinx_Vivado_SDK_2016.1_0409_1 && \
rm id_rsa && \
rm /root/.ssh/known_hosts
rm -rf Xilinx_Vivado_SDK_2016.1_0409_1*
#make a Vivado user
RUN adduser --disabled-password --gecos '' vivado
......
......@@ -4,14 +4,16 @@ Vivado installed into a docker image for CI purposes.
## Build instructions
1. This docker file assumes your Vivado installer is available on a host a ~/Downloads/Xilinx_Vivado_SDK_2016.1_0409_1.tar.gz
2. Create a password-less ssh rsa key `ssh-keygen -t rsa`
3. Copy resulting private key (`~/.ssh/id_rsa`) into the directory
4. Copy your Vivado `Xilinx.lic` file into the directory.
5. Potentialy modify the `install_config.txt` to change the install options.
6. Build the image (will take about 10 minutes) passing in a build arg
1. This docker file assumes the Vivado download is available on a webserver somewhere. This can easily be the build machine using the webserver in Python.
```shell
docker build --build-arg HOST_LOGIN=user@host --rm -t vivado:2016.1 .
cd /path/to/Vivado/download
python -m http.server
```
2. Copy your Vivado `Xilinx.lic` file into the directory.
3. Potentialy modify the `install_config.txt` to change the install options.
4. Build the image (will take about 10 minutes) passing in a build arg
```shell
docker build --build-arg HOST=HOST_NAME:8000 -t vivado:2016.1 .
```
## Running
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment