pull/704/head
Kye Gomez 2 weeks ago
parent df76859173
commit 9dc8af7d74

@ -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 . .
Loading…
Cancel
Save