Skip to content

Commit

Permalink
Added a DockerFile for building Linux version of the SLM Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Avijit committed Feb 19, 2025
1 parent 56dbfa6 commit 25f6528
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
22 changes: 22 additions & 0 deletions examples/slm_engine/build_scripts/Dockerfile.Linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use Ubuntu 24.04 as the base image
FROM ubuntu:24.04

# Set environment variables to avoid prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive

# Update the package list and install required packages
RUN apt-get update && apt-get install -y \
cmake \
clang \
llvm \
python3.12 \
python3.12-venv \
python3.12-dev \
git \
git-lfs \
build-essential \
&& apt-get clean

# Install Python packages
RUN apt install python3-pip python3-requests -y

13 changes: 13 additions & 0 deletions examples/slm_engine/build_scripts/build_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e
set -x
set -u

# Build the docker image
docker build -t slm-engine-builder -f Dockerfile.Linux .

# Run the docker to build dependencies
docker run --rm -v `pwd`/../../../:`pwd`/../../../ -u $(id -u):$(id -g) -w `pwd` slm-engine-builder python3 build_deps.py

# Next build the slm_engine
docker run --rm -v `pwd`/../../../:`pwd`/../../../ -u $(id -u):$(id -g) -w `pwd` slm-engine-builder python3 build.py

0 comments on commit 25f6528

Please sign in to comment.