Added Langflow and Local AI sandboxes with their exploitation code#8
Added Langflow and Local AI sandboxes with their exploitation code#8gontarget wants to merge 3 commits intoGenAI-Security-Project:mainfrom
Conversation
There was a problem hiding this comment.
There is something wrong going on with port mapping. I am not able to open it at http://localhost:7860.
felipepenha
left a comment
There was a problem hiding this comment.
I am requesting changes to ensure sandboxes are ready to spin up in any system.
| fi | ||
| @if podman run -d \ | ||
| --name $(CONTAINER_NAME) \ | ||
| --network host \ |
There was a problem hiding this comment.
Still not working. You will need to replace --network host by -p $(PORT):$(PORT).
| run: | ||
| podman run -d \ | ||
| --name $(CONTAINER_NAME) \ | ||
| --network host \ |
There was a problem hiding this comment.
You will need to replace --network host by -p 8080:8080.
| RUN curl -fsSL \ | ||
| https://github.com/mudler/LocalAI/releases/download/v2.17.1/local-ai-Linux-x86_64 \ | ||
| -o local-ai \ | ||
| && chmod +x local-ai |
There was a problem hiding this comment.
Please, replace by
RUN ARCH=$(uname -m) && \
case "$ARCH" in \
aarch64|arm64) BINARY="local-ai-Linux-arm64" ;; \
x86_64) BINARY="local-ai-Linux-x86_64" ;; \
*) echo "Unsupported architecture: $ARCH"; exit 1 ;; \
esac && \
curl -fsSL "https://github.com/mudler/LocalAI/releases/download/v2.17.1/$BINARY" -o local-ai && \
chmod +x local-ai
to ensure it works on most hardware.
| run: | ||
| podman run -d \ | ||
| --name $(CONTAINER_NAME) \ | ||
| --network host \ |
There was a problem hiding this comment.
Please, remove --network host, as this conflicts with the port mapping.
| RUN pip install --no-cache-dir \ | ||
| "invokeai==5.3.0" \ | ||
| --extra-index-url https://download.pytorch.org/whl/cpu |
There was a problem hiding this comment.
Please, replace by
# Fix for bitsandbytes on arm64 (InvokeAI v5.3.0 requires bitsandbytes==0.43.3 which lacks arm64 Linux wheels)
# Since the lab is CPU-only, we create a dummy package to satisfy pip without crashing.
RUN ARCH=$(uname -m) && \
case "$ARCH" in \
aarch64|arm64) \
echo "Building dummy bitsandbytes wheel for arm64..." && \
mkdir -p /tmp/dummy-bnb && cd /tmp/dummy-bnb && \
echo "from setuptools import setup; setup(name='bitsandbytes', version='0.43.3')" > setup.py && \
pip install . && \
rm -rf /tmp/dummy-bnb \
;; \
x86_64) \
echo "x86_64 architecture detected, no bitsandbytes workaround needed" \
;; \
*) echo "Unsupported architecture: $ARCH"; exit 1 ;; \
esac
# Install InvokeAI 5.3.0 (CPU-only, no GPU required for lab)
RUN pip install --no-cache-dir \
"invokeai==5.3.0" \
--extra-index-url https://download.pytorch.org/whl/cpu
to ensure it works on most hardware.
No description provided.