Skip to content

Commit

Permalink
Cmake cleanup Faabric Part 1 (#164)
Browse files Browse the repository at this point in the history
* Make workon.sh generate a working venv

* Update faabric-base.dockerfile with newer dependencies

Keeping old versions during transition to newer toolchain

* Fix missing includes

* Update zstd

* Remove unnecessary apt-get update in faabric.dockerfile

* Remove dependencies unnecessary for faabric

* Bump to 0.2.0

Co-authored-by: Simon Shillaker <[email protected]>
  • Loading branch information
eigenraven and Shillaker authored Oct 27, 2021
1 parent 1bb5c13 commit 2699f67
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FAABRIC_VERSION=0.1.2
FAABRIC_CLI_IMAGE=faasm/faabric:0.1.2
FAABRIC_VERSION=0.2.0
FAABRIC_CLI_IMAGE=faasm/faabric:0.2.0
COMPOSE_PROJECT_NAME=faabric-dev
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
REDIS_QUEUE_HOST: redis
REDIS_STATE_HOST: redis
container:
image: faasm/faabric:0.1.2
image: faasm/faabric:0.2.0
defaults:
run:
working-directory: /code/faabric
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
REDIS_QUEUE_HOST: redis
REDIS_STATE_HOST: redis
container:
image: faasm/faabric:0.1.2
image: faasm/faabric:0.2.0
defaults:
run:
working-directory: /code/faabric
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
REDIS_QUEUE_HOST: redis
REDIS_STATE_HOST: redis
container:
image: faasm/faabric:0.1.2
image: faasm/faabric:0.2.0
defaults:
run:
working-directory: /code/faabric
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.2.0
9 changes: 8 additions & 1 deletion bin/workon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ pushd ${PROJ_ROOT}>>/dev/null
# ----------------------------

if [ ! -d "venv" ]; then
python3 -m venv venv
python3 -m venv venv
(
source venv/bin/activate
pip install -U pip
pip install -U setuptools
pip install -U wheel
pip install -r requirements.txt
)
fi

export VIRTUAL_ENV_DISABLE_PROMPT=1
Expand Down
2 changes: 1 addition & 1 deletion cmake/ExternalProjects.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ set(ZSTD_LZ4_SUPPORT OFF CACHE INTERNAL "")

FetchContent_Declare(zstd_ext
GIT_REPOSITORY "https://github.com/facebook/zstd"
GIT_TAG "v1.4.9"
GIT_TAG "v1.5.0"
SOURCE_SUBDIR "build/cmake"
)

Expand Down
44 changes: 31 additions & 13 deletions docker/faabric-base.dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,55 @@
FROM ubuntu:20.04

RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-get install -y software-properties-common gpg wget curl
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add -
RUN add-apt-repository -y -n "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main"
RUN add-apt-repository -y -n "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main"
RUN add-apt-repository -y -n "deb https://apt.kitware.com/ubuntu/ focal main"
RUN add-apt-repository -y -n ppa:ubuntu-toolchain-r/test
RUN apt-get update

RUN apt install -y \
autoconf \
automake \
build-essential \
clang-10 \
clang-13 \
clang-format-10 \
clang-format-13 \
clang-tidy-10 \
clang-tidy-13 \
clang-tools-13 \
cmake \
g++-11 \
git \
libhiredis-dev \
libtool \
kitware-archive-keyring \
libboost-filesystem-dev \
libc++-13-dev \
libc++abi-13-dev \
libcurl4-openssl-dev \
libhiredis-dev \
libpython3-dev \
libssl-dev \
libstdc++-11-dev \
libtool \
libunwind-13-dev \
libz-dev \
lld-13 \
lldb-13 \
make \
ninja-build \
pkg-config \
python3-dev \
python3-pip \
python3-venv \
redis-tools \
wget
sudo \
unzip

# CMake
RUN apt remove --purge --auto-remove cmake
WORKDIR /setup
RUN wget -q -O \
cmake-linux.sh \
https://github.com/Kitware/CMake/releases/download/v3.18.2/cmake-3.18.2-Linux-x86_64.sh
RUN sh cmake-linux.sh -- --skip-license --prefix=/usr/local
RUN curl -s -L -o /tmp/conan-latest.deb https://github.com/conan-io/conan/releases/latest/download/conan-ubuntu-64.deb && sudo dpkg -i /tmp/conan-latest.deb && rm -f /tmp/conan-latest.deb

# Tidy up
WORKDIR /
RUN rm -r /setup
RUN apt-get clean autoclean
RUN apt-get autoremove
2 changes: 0 additions & 2 deletions docker/faabric.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ ARG FAABRIC_VERSION
# Flag to say we're in a container
ENV FAABRIC_DOCKER="on"

RUN apt-get update

# Put the code in place
WORKDIR /code
RUN git clone -b v${FAABRIC_VERSION} https://github.com/faasm/faabric
Expand Down
8 changes: 6 additions & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,12 @@ docker-compose stop
## Releasing

Create a new branch, then find and replace the current version with the relevant
bumped version. Currently it's held in `VERSION`, `.env`,
`mpi-native/mpi-native.env` and the Github Actions configuration.
bumped version. It should appear in:

- `VERSION`
- `.env`
- `.github/workflows/tests.yml`.
- `mpi-native/mpi-native.env`

Once done, commit and push, then run:

Expand Down
1 change: 1 addition & 0 deletions include/faabric/state/StateKeyValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <atomic>
#include <chrono>
#include <memory>
#include <shared_mutex>
#include <string>
#include <thread>
Expand Down
1 change: 1 addition & 0 deletions include/faabric/util/random.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <string>
#include <unordered_set>

namespace faabric::util {
Expand Down
2 changes: 1 addition & 1 deletion mpi-native/mpi-native.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FAABRIC_VERSION=0.0.18
FAABRIC_VERSION=0.2.0
FAABRIC_MPI_NATIVE_IMAGE=faasm/faabric-mpi-native:0.0.18
COMPOSE_PROJECT_NAME=faabric-mpi

Expand Down
1 change: 1 addition & 0 deletions src/util/environment.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <faabric/util/config.h>
#include <faabric/util/environment.h>

#include <stdexcept>
#include <thread>

namespace faabric::util {
Expand Down

0 comments on commit 2699f67

Please sign in to comment.