Skip to content

Commit

Permalink
Add additional support packages to Dockerfile
Browse files Browse the repository at this point in the history
* Removed some unnecessary quotes
* Remove entire /opt/emsdk/downloads directory during cleanup
  • Loading branch information
georgestagg committed Nov 27, 2023
1 parent 2d77015 commit f6c2878
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ RUN apt-get update && apt-get -y install --no-install-recommends \
cmake \
curl \
gfortran \
gh \
git \
gnupg \
gperf \
jq \
libbz2-dev \
libcurl4-openssl-dev \
libglib2.0-dev-bin \
Expand All @@ -28,6 +30,7 @@ RUN apt-get update && apt-get -y install --no-install-recommends \
python3 \
quilt \
sqlite3 \
sudo \
tzdata \
unzip \
wget
Expand All @@ -40,16 +43,16 @@ RUN ./emsdk install "${EMSCRIPTEN_VERSION}" && \

# Build LLVM flang
COPY Makefile /root/flang-wasm/Makefile
RUN . "/opt/emsdk/emsdk_env.sh" && \
cd "/root/flang-wasm" && \
RUN . /opt/emsdk/emsdk_env.sh && \
cd /root/flang-wasm && \
make PREFIX="/opt/flang" FLANG_WASM_CMAKE_VARS="-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ -DLLVM_USE_LINKER=lld" && \
make PREFIX="/opt/flang" install

# Clean up
RUN . "/opt/emsdk/emsdk_env.sh" && emcc --clear-cache
RUN rm -rf "/root/flang-wasm" "/opt/emsdk/downloads/*-wasm-binaries.tbz2"
RUN apt-get clean && rm -rf "/var/lib/apt/lists/*"
RUN . /opt/emsdk/emsdk_env.sh && emcc --clear-cache
RUN rm -rf /root/flang-wasm /opt/emsdk/downloads/*
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Squash docker image layers
FROM $BASE
Expand Down

0 comments on commit f6c2878

Please sign in to comment.