forked from frdel/agent-zero
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from deciduus/main
Incorporate changes from deciduus agent-zero fork [~ IDE terminal compatibility, docker quality of life, prompt optimizations, execution handling & style encoding, NVIDIA CUDA (GPU support) ~ frdel#19]
- Loading branch information
Showing
16 changed files
with
880 additions
and
180 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
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
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 |
---|---|---|
|
@@ -4,6 +4,3 @@ | |
if [ -f /etc/bashrc ]; then | ||
. /etc/bashrc | ||
fi | ||
|
||
# Activate the virtual environment | ||
source /opt/venv/bin/activate |
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,43 +1,56 @@ | ||
# Use the latest slim version of Debian | ||
FROM --platform=$TARGETPLATFORM debian:bookworm-slim | ||
# FROM --platform=$TARGETPLATFORM debian:bookworm-slim | ||
|
||
# Specify the base image with CUDA support | ||
FROM --platform=$TARGETPLATFORM nvidia/cuda:11.0.3-base-ubuntu20.04 | ||
|
||
# Set ARG for platform-specific commands | ||
ARG TARGETPLATFORM | ||
|
||
# Update and install necessary packages | ||
# Set environment variables | ||
ENV TZ=America/Chicago | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV PATH="/usr/bin:$PATH" | ||
|
||
# Update and install necessary packages, including tzdata | ||
RUN apt-get update && apt-get install -y \ | ||
tzdata \ | ||
python3 \ | ||
python3-pip \ | ||
python3-venv \ | ||
nodejs \ | ||
npm \ | ||
openssh-server \ | ||
sudo \ | ||
cmake \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set up timezone | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \ | ||
&& dpkg-reconfigure -f noninteractive tzdata | ||
|
||
# Set up SSH | ||
RUN mkdir /var/run/sshd && \ | ||
echo 'root:toor' | chpasswd && \ | ||
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | ||
|
||
# Create and activate Python virtual environment | ||
ENV VIRTUAL_ENV=/opt/venv | ||
RUN python3 -m venv $VIRTUAL_ENV | ||
|
||
# Copy initial .bashrc with virtual environment activation to a temporary location | ||
COPY .bashrc /etc/skel/.bashrc | ||
|
||
# Copy the script to ensure .bashrc is in the root directory | ||
COPY initialize.sh /usr/local/bin/initialize.sh | ||
RUN chmod +x /usr/local/bin/initialize.sh | ||
|
||
# Ensure the virtual environment and pip setup | ||
RUN $VIRTUAL_ENV/bin/pip install --upgrade pip | ||
# Ensure pip is upgraded and install Python packages globally | ||
RUN python3 -m pip install --upgrade pip | ||
|
||
# Install required Python packages globally with no cache and to the target directory | ||
RUN python3 -m pip install --target=/usr/local/lib/python3.8/dist-packages \ | ||
numpy scipy pandas torch torchvision torchaudio \ | ||
tensorflow scikit-learn transformers accelerate diffusers \ | ||
opencv-python matplotlib seaborn | ||
|
||
# Expose SSH port | ||
EXPOSE 22 | ||
|
||
# Init .bashrc | ||
CMD ["/usr/local/bin/initialize.sh"] | ||
|
||
|
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 +1 @@ | ||
docker buildx build --platform linux/amd64,linux/arm64 -t frdel/agent-zero-exe:latest --push . | ||
docker buildx build --platform linux/amd64,linux/arm64 -t docker-agent-zero-exe:latest --push . |
Oops, something went wrong.