-
-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
23 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
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 . . |