From 17b28385e3b4dbf2068665e80e6b0657f8012ebc Mon Sep 17 00:00:00 2001
From: Kye Gomez <kye@swarms.world>
Date: Mon, 23 Dec 2024 14:12:17 -0800
Subject: [PATCH] [DOCKER]

---
 Dockerfile | 41 ++++++++++++++++++-----------------------
 1 file changed, 18 insertions(+), 23 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 08c42d55..91c42041 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,31 +1,26 @@
-# Use an official Python runtime as a parent image
+# Use Python 3.11 instead of 3.13
 FROM python:3.11-slim
 
 # Set environment variables
-ENV PYTHONDONTWRITEBYTECODE 1
-ENV PYTHONUNBUFFERED 1
+ENV PYTHONDONTWRITEBYTECODE=1 \
+    PYTHONUNBUFFERED=1 \
+    WORKSPACE_DIR="agent_workspace" \
+    OPENAI_API_KEY="your_swarm_api_key_here"
 
-# Set the working directory in the container
+# 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 Python dependencies
-# COPY requirements.txt and pyproject.toml if you're using poetry for dependency management
-COPY requirements.txt .
-RUN pip install --upgrade pip
-RUN pip install --no-cache-dir -r requirements.txt
+# Install swarms package
+RUN pip3 install -U swarm-models
+RUN pip3 install -U swarms
 
-# Install the 'swarms' package, assuming it's available on PyPI
-RUN pip install -U swarms
-
-# Copy the rest of the application
-COPY . .
-
-# Expose port if your application has a web interface
-# EXPOSE 5000
-
-# # Define environment variable for the swarm to work
-# ENV OPENAI_API_KEY=your_swarm_api_key_here
-
-# If you're using `CMD` to execute a Python script, make sure it's executable
-# RUN chmod +x example.py
+# Copy the application
+COPY . .
\ No newline at end of file