Skip to content

Commit

Permalink
[docker docs]
Browse files Browse the repository at this point in the history
  • Loading branch information
kyegomez committed Dec 23, 2024
1 parent 9dc8af7 commit df922a2
Showing 1 changed file with 31 additions and 22 deletions.
53 changes: 31 additions & 22 deletions docs/swarms/install/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,43 +127,52 @@ Before you begin, ensure you have the following installed:
poetry install --extras "desktop"
```

=== "Using Docker COMING SOON [DOES NOT WORK YET]"
=== "Using Docker"

Docker is an excellent option for creating isolated and reproducible environments, suitable for both development and production.
Docker is an excellent option for creating isolated and reproducible environments, suitable for both development and production. Contact us if there are any issues with the docker setup

1. **Pull the Docker image:**

```bash
docker pull kyegomez/swarms
docker pull swarmscorp/swarms:tagname

```

2. **Run the Docker container:**

```bash
docker run -it --rm kyegomez/swarms
docker run -it --rm swarmscorp/swarms:tagname
```

3. **Build and run a custom Docker image:**

```dockerfile
# Dockerfile
FROM python:3.10-slim

# Set up environment
WORKDIR /app
COPY . /app

# Install dependencies
RUN pip install --upgrade pip && \
pip install -e .

CMD ["python", "your_script.py"]
```

```bash
# Build and run the Docker image
docker build -t swarms-custom .
docker run -it --rm swarms-custom
# Use Python 3.11 instead of 3.13
FROM python:3.11-slim

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
WORKSPACE_DIR="agent_workspace" \
OPENAI_API_KEY="your_swarm_api_key_here"

# Set the working directory
WORKDIR /usr/src/swarms

# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
gcc \
g++ \
gfortran \
&& rm -rf /var/lib/apt/lists/*

# Install swarms package
RUN pip3 install -U swarm-models
RUN pip3 install -U swarms

# Copy the application
COPY . .
```

=== "Using Kubernetes"
Expand Down

0 comments on commit df922a2

Please sign in to comment.