Skip to content

Commit

Permalink
Trying to also get this working on docker too
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewQuijano committed Jul 10, 2024
1 parent 5e1519d commit b72656f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ COPY ./requirements.txt /tmp
RUN mv /tmp/$(echo "$BASE_IMAGE" | sed 's/:/_/g')_build.txt /tmp/build_dep.txt && \
mv /tmp/$(echo "$BASE_IMAGE" | sed 's/:/_/g')_base.txt /tmp/base_dep.txt

RUN apt-get -qq -y update

# Base image just needs runtime dependencies
RUN [ -e /tmp/base_dep.txt ] && \
apt-get -qq update && \
apt-get -qq install -y --no-install-recommends curl $(cat /tmp/base_dep.txt | grep -o '^[^#]*') && \
apt-get clean

# Finally: Install panda debian package, you need a version that has the Dwarf2 Plugin
RUN wget https://github.com/panda-re/panda/releases/download/v1.8.23/pandare_22.04.deb
RUN command apt install -qq -y ./pandare_22.04.deb
RUN pip install -r requirements.txt
RUN curl -LJO https://github.com/panda-re/panda/releases/download/v1.8.23/pandare_22.04.deb
RUN apt install -qq -y ./pandare_22.04.deb
RUN pip install -r /tmp/requirements.txt

### BUILD IMAGE - STAGE 2
FROM base AS builder
ARG BASE_IMAGE

RUN [ -e /tmp/build_dep.txt ] && \
apt-get -qq update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $(cat /tmp/build_dep.txt | grep -o '^[^#]*') && \
apt-get install -y --no-install-recommends $(cat /tmp/build_dep.txt | grep -o '^[^#]*') && \
apt-get clean

#### Develop setup: panda built + pypanda installed (in develop mode) - Stage 3
Expand Down
1 change: 1 addition & 0 deletions dependencies/ubuntu_22.04_base.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# lava dependencies, needed to run LAVA
python3-pip
4 changes: 3 additions & 1 deletion dependencies/ubuntu_22.04_build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ libpq-dev
llvm-11-dev
postgresql
socat
wget

# Curl must work
ca-certificates

# Based on original setup.py after panda is installed step
# https://installati.one/install-odb-ubuntu-20-04/?expand_article=1
Expand Down
17 changes: 4 additions & 13 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@ progress() {
echo -e "\e[32m[lava_install]\e[0m \e[1m$1\e[0m"
}

# Step 1: Install panda debian package
wget https://github.com/panda-re/panda/releases/download/v1.8.23/pandare_22.04.deb
$SUDO apt install ./pandare_22.04.deb

# Remove the comment to update all debian stuff from sources.list
$SUDO cp /etc/apt/sources.list /etc/apt/sources.list~
$SUDO sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
$SUDO apt-get update

$SUDO apt-get -qq -y update
progress "Updates complete"

# This was originally in the docs/setup.md, I removed things starting with 'python-' as that should be installed via pip
Expand All @@ -48,15 +40,14 @@ else
exit 1
fi

curl -LJO https://github.com/panda-re/panda/releases/download/v1.8.23/pandare_22.04.deb
$SUDO apt install ./pandare_22.04.deb

progress "Installed build dependencies"

pip3 install --upgrade pip
pip3 install -r requirements.txt
progress "Installed Python requirements"

if [ -z "${LLVM_DIR}" ]; then
export LLVM_DIR=/usr/lib/llvm-11
fi

$SUDO bash setup_container.sh
progress "Installed LAVA"

0 comments on commit b72656f

Please sign in to comment.