diff --git a/Dockerfile b/Dockerfile index 08c8fce..fe7aa89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,24 @@ -FROM ubuntu:jammy-20240530 +FROM ubuntu:jammy-20240911.1 +RUN useradd -m -N -u 1000 ubuntu && \ + echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/99disable-install-recommends # +RUN apt-get update && apt-get install -y \ + python3.10 \ + pip \ + nano \ + unzip \ + curl \ + git \ + default-jdk-headless +USER ubuntu +WORKDIR /home/ubuntu/ +ENV PATH=/home/ubuntu/.local/bin:$PATH -RUN apt update && \ - apt install --no-install-recommends -y python3.10 && \ - apt install --no-install-recommends -y pip && \ - apt install nano && \ - apt install unzip -y && \ - apt install curl -y && \ - apt install git -y && \ - apt install default-jdk -y && \ - # apt install cargo -y && \ - # python3 -m pip install maturin && \ - python3 -m pip install -U garak==0.9.0.13 && \ - python3 -m pip install giskard[llm] && \ - python3 -m pip install -U fsspec && \ - python3 -m pip install -U pyarrow && \ - python3 -m pip install -U huggingface_hub +COPY --chown=ubuntu requirements.txt requirements.txt +RUN python3 -m pip install --upgrade pip && \ + python3 -m pip install -r requirements.txt -WORKDIR /home/ubuntu/ -COPY giskard/llm_scan.py giskard/llm_scan.py -COPY Dependency-Check/dependency-check-example-report.html Dependency-Check/dependency-check-example-report.html +COPY --chown=ubuntu giskard/llm_scan.py giskard/llm_scan.py +COPY --chown=ubuntu Dependency-Check/dependency-check-example-report.html Dependency-Check/dependency-check-example-report.html WORKDIR /home/ubuntu/Dependency-Check RUN VERSION=$(curl -s https://jeremylong.github.io/DependencyCheck/current.txt) && \ curl -Ls "https://github.com/jeremylong/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip" --output dependency-check.zip && \ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..45b0da3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +garak==0.9.0.13 +giskard[llm] +fsspec +pyarrow +huggingface_hub