-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86e0104
commit 3b0a80a
Showing
1 changed file
with
31 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |