Spaces:
Sleeping
Sleeping
ejschwartz
commited on
Commit
•
9e61abe
1
Parent(s):
f99e17c
Update to use new small version model
Browse files- Dockerfile +10 -7
Dockerfile
CHANGED
@@ -9,9 +9,9 @@ COPY ./requirements.txt /code/requirements.txt
|
|
9 |
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
10 |
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
11 |
apt-get -y update && apt-get -y install -y python3-pip python-is-python3 \
|
12 |
-
git pkg-config libsentencepiece-dev nano sudo unzip
|
13 |
|
14 |
-
RUN --mount=type=cache,target=/root/.cache pip install --upgrade -r /code/requirements.txt
|
15 |
|
16 |
# Install Ghidrathon
|
17 |
|
@@ -19,7 +19,7 @@ WORKDIR /tmp/
|
|
19 |
|
20 |
RUN wget https://github.com/mandiant/Ghidrathon/releases/download/v4.0.0/Ghidrathon-v4.0.0.zip
|
21 |
RUN unzip Ghidrathon-v4.0.0.zip -d ghidrathon
|
22 |
-
RUN --mount=type=cache,target=/root/.cache
|
23 |
RUN python ghidrathon/ghidrathon_configure.py /ghidra
|
24 |
RUN unzip ghidrathon/Ghidrathon-v4.0.0.zip -d /ghidra/Ghidra/Extensions
|
25 |
|
@@ -30,12 +30,15 @@ WORKDIR /
|
|
30 |
RUN git clone -b main https://github.com/edmcman/DIRTY # 09-25-24
|
31 |
#ADD ./DIRTY /DIRTY
|
32 |
|
33 |
-
RUN --mount=type=cache,target=/root/.cache pip install --upgrade -r /DIRTY/requirements.txt
|
34 |
|
35 |
-
|
|
|
|
|
|
|
36 |
|
37 |
-
# Set up a new user named "user"
|
38 |
-
RUN useradd -m -u
|
39 |
|
40 |
# Switch to the "user" user
|
41 |
USER user
|
|
|
9 |
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
10 |
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
11 |
apt-get -y update && apt-get -y install -y python3-pip python-is-python3 \
|
12 |
+
git pkg-config libsentencepiece-dev libprotobuf-dev nano sudo unzip
|
13 |
|
14 |
+
RUN --mount=type=cache,target=/root/.cache pip install --break-system-packages --upgrade -r /code/requirements.txt
|
15 |
|
16 |
# Install Ghidrathon
|
17 |
|
|
|
19 |
|
20 |
RUN wget https://github.com/mandiant/Ghidrathon/releases/download/v4.0.0/Ghidrathon-v4.0.0.zip
|
21 |
RUN unzip Ghidrathon-v4.0.0.zip -d ghidrathon
|
22 |
+
RUN --mount=type=cache,target=/root/.cache pip install --break-system-packages -r ghidrathon/requirements.txt
|
23 |
RUN python ghidrathon/ghidrathon_configure.py /ghidra
|
24 |
RUN unzip ghidrathon/Ghidrathon-v4.0.0.zip -d /ghidra/Ghidra/Extensions
|
25 |
|
|
|
30 |
RUN git clone -b main https://github.com/edmcman/DIRTY # 09-25-24
|
31 |
#ADD ./DIRTY /DIRTY
|
32 |
|
33 |
+
RUN --mount=type=cache,target=/root/.cache pip install --break-system-packages --upgrade -r /DIRTY/requirements.txt
|
34 |
|
35 |
+
# Download the DIRTY model
|
36 |
+
#RUN --mount=type=cache,target=/root/.cache (cd /root/.cache; (echo "b1e812b758eccf402271607c40fa491b5486742abf3706be174dc3f4fe87b9dd data1.tar.bz2" | sha256sum -c || wget -O '/root/.cache/data1.tar.bz2' 'https://cmu.box.com/shared/static/nx9fyn8jx0i9p4bftw8f2giqlufnoyj5')) && tar -xvjf /root/.cache/data1.tar.bz2 -C /DIRTY/dirty
|
37 |
+
RUN pip install --break-system-packages huggingface_hub[cli]
|
38 |
+
RUN --mount=type=cache,target=/root/.cache huggingface-cli download --repo-type model ejschwartz/dirty-ghidra --local-dir /DIRTY/dirty # 10-01-24
|
39 |
|
40 |
+
# Set up a new user named "user"
|
41 |
+
RUN useradd -m -u 1001 user
|
42 |
|
43 |
# Switch to the "user" user
|
44 |
USER user
|