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
|
FROM python:3.11-slim
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
ENV PYTHONDONTWRITEBYTECODE 1
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||||
ENV PYTHONUNBUFFERED 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
|
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
|
# Install swarms package
|
||||||
# COPY requirements.txt and pyproject.toml if you're using poetry for dependency management
|
RUN pip3 install -U swarm-models
|
||||||
COPY requirements.txt .
|
RUN pip3 install -U swarms
|
||||||
RUN pip install --upgrade pip
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
# Install the 'swarms' package, assuming it's available on PyPI
|
# Copy the application
|
||||||
RUN pip install -U swarms
|
COPY . .
|
||||||
|
|
||||||
# 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
|
|
Loading…
Reference in new issue