-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile
More file actions
68 lines (57 loc) · 1.71 KB
/
Dockerfile
File metadata and controls
68 lines (57 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Use the Rust image as the base
FROM rust:1.82
# Install system packages and set up Python symlink
RUN apt-get update && apt-get install -y --no-install-recommends \
zsh \
python3-pip \
python3-dev \
python3-venv \
pybind11-dev \
python-is-python3 \
git \
autoconf \
build-essential \
flex \
bison \
libfl2 \
libfl-dev \
libexpat1-dev \
gettext \
perl \
ccache \
libgoogle-perftools-dev \
numactl \
perl-doc \
help2man \
cmake \
ninja-build \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Set default shell to zsh
SHELL ["/bin/zsh", "-c"]
# You can use the following command instead
# RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Set build environment variables
ENV CC="ccache gcc"
ENV CXX="ccache g++"
ENV CCACHE_DIR="/tmp/ccache"
ENV PYTHONUSERBASE="/tmp/.local"
# Set up Assassyn related environment variables
ENV ASSASSYN_HOME="/app"
ENV CARGO_TARGET_DIR="/app/.sim-runtime-cache/"
ENV VERILATOR_ROOT="/app/3rd-party/verilator"
ENV PYTHONPATH="/app/python"
# Set working directory
WORKDIR /app
RUN python -m venv /app/.assassyn-venv
RUN pip install \
pytest==7.4.3 \
pylint==3.2.3 \
pytest-xdist==3.6.1 \
--break-system-packages
# Install additional Python dependencies from requirements.txt
COPY python/requirements.txt /app/python/requirements.txt
RUN pip install -r /app/python/requirements.txt --break-system-packages
# Ensure setup.sh is sourced on shell startup if it exists
RUN echo '[ -f /app/setup.sh ] && source /app/setup.sh' >> /root/.zshrc
# Define the default command
CMD ["/bin/zsh"]