Skip to content

Commit

Permalink
Added Dockerfile fo Agent API
Browse files Browse the repository at this point in the history
  • Loading branch information
antoninoLorenzo committed Jul 5, 2024
1 parent 86e0104 commit 3b0a80a
Showing 1 changed file with 31 additions and 22 deletions.
53 changes: 31 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
# API Docker File
# ----------- Agent API Docker File
# --build-arg arg1=v1 arg2=v2
ARG ollama-model=llama3
ARG ollama-endpoint=http://localhost:11434

# Kali Setup
FROM kalilinux/kali-rolling

RUN apt-get update && \
apt-get install -y kali-linux-headless
RUN apt-get update && apt-get install -y \
python3-pip ca-certificates python3 python3-wheel \
nmap \
gobuster \
hashcat \
exploitdb \
sqlmap

# Setup environment
# Setup API
RUN mkdir "api"
WORKDIR /api

COPY . src
COPY . requirements.txt
COPY . tool_settings

# move tool settings to user home/.aiops/tools
# ...
# or soem way to add when running docker (...)
COPY . .env

RUN pip install -r requirements.txt

# run api





COPY src ./src
COPY tools_settings ./tools_settings
COPY requirements.txt .

RUN pip3 install -r requirements.txt
RUN python3 -m spacy download en_core_web_lg && \
mkdir -p $HOME/.aiops/tools && \
mv tools_settings/* ~/.aiops/tools/

# Run API
ENV MODEL=${ollama-model}
ENV ENDPOINT=${ollama-endpoint}
EXPOSE 8000
CMD ["fastapi", "dev", "--host", "0.0.0.0", "./src/api.py"]

# docker build -t ai-ops:api-dev --build-arg ollama-endpoint=ENDPOINT .
# docker run -p 8000:8000 ai-ops:api-dev

0 comments on commit 3b0a80a

Please sign in to comment.