Skip to content

Commit

Permalink
update docker scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ladisgin committed Feb 26, 2024
1 parent 6c98b5d commit 3466b5e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
6 changes: 4 additions & 2 deletions docker/Dockerfile_base
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ RUN wget https://github.com/CLIUtils/CLI11/releases/download/v1.9.1/CLI11.hpp -P
RUN wget https://github.com/agauniyal/rang/releases/download/v3.1.0/rang.hpp -P $UTBOT_ALL/cli

# Applying environment variables to all users
COPY building_dependencies/runtime_env.sh /home/utbot/.bashrc
COPY building_dependencies/runtime_env.sh /root/.bashrc
COPY building_dependencies/runtime_env.sh /tmp
RUN cat /tmp/runtime_env.sh > /home/utbot/.bashrc
RUN cat /tmp/runtime_env.sh > /root/.bashrc
RUN rm /tmp/runtime_env.sh

# We need to install version 32 and 64 for klee.
# Install uclibc-32
Expand Down
6 changes: 3 additions & 3 deletions docker/building_dependencies/runtime_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ export KLEE_RUNTIME_BUILD="Debug+Asserts"
export CC=$UTBOT_INSTALL_DIR/bin/clang
export CXX=$UTBOT_INSTALL_DIR/bin/clang++
export CPATH=$CPATH:$UTBOT_ALL/klee/include
export LD_LIBRARY_PATH=$UTBOT_INSTALL_DIR/lib
export LDFLAGS='-fuse-ld=gold'
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$UTBOT_INSTALL_DIR/lib
export LDFLAGS=$LDFLAGS:'-fuse-ld=gold'
export CFLAGS="$CFLAGS -gdwarf-4"
export CXXFLAGS="$CXXFLAGS -gdwarf-4"
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$UTBOT_ALL/bear/bin:$UTBOT_ALL/klee/bin:$UTBOT_INSTALL_DIR/bin:$PATH
export PATH=$UTBOT_ALL/bear/bin:$UTBOT_ALL/klee/bin:$UTBOT_INSTALL_DIR/bin:$PATH

if [ -z "${VERSION}" ]
then
Expand Down
10 changes: 0 additions & 10 deletions docker/utbot_docker_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

CONTAINER_NAME=$USER-utbot-dev
MOUNT_NAME=$USER-utbot
MOUNT_LOCAL_NAME=$MOUNT_NAME-local-mnt

read -e -p "Enter base image tag: " IMAGE_TAG
IMAGE="ghcr.io/unittestbot/utbotcpp/base_env:$IMAGE_TAG"
Expand All @@ -31,21 +30,12 @@ else
fi
set -e

# Define local mount folder
read -e -p "Enter local folder to mount in UTBot: " -i "$PWD" PROJECT_SRC
if docker volume inspect $MOUNT_LOCAL_NAME > /dev/null 2>&1 ; then
docker volume rm $MOUNT_LOCAL_NAME > /dev/null
fi
docker volume create --driver lebokus/bindfs:latest -o sourcePath=$PROJECT_SRC -o map=$UID/1000:@$UID/@1000 $MOUNT_LOCAL_NAME > /dev/null
echo "'$MOUNT_LOCAL_NAME' docker volume created."

echo "Recreating docker container..."
docker run -d --restart=unless-stopped \
--cap-add=SYS_PTRACE --security-opt seccomp=unconfined --security-opt apparmor=unconfined \
--name=$CONTAINER_NAME \
-p $UTBOT_SSH_PORT:2020 \
-p $UTBOT_SERVER_PORT:2121 \
-v $MOUNT_LOCAL_NAME:/home/utbot/mnt \
-v /etc/localtime:/etc/localtime:ro \
$IMAGE > /dev/null
echo "Container '$CONTAINER_NAME' is up and running."
Expand Down

0 comments on commit 3466b5e

Please sign in to comment.