Skip to content

Commit

Permalink
[DOCKER]
Browse files Browse the repository at this point in the history
  • Loading branch information
kyegomez committed Dec 23, 2024
1 parent df76859 commit 9dc8af7
Showing 1 changed file with 18 additions and 23 deletions.
41 changes: 18 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 . .

0 comments on commit 9dc8af7

Please sign in to comment.