You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/Dockerfile

45 lines
1.6 KiB

11 months ago
# ==================================
10 months ago
# Use an official Python runtime as a parent image image
11 months ago
FROM python:3.9-slim
10 months ago
#RUN apt-get update && apt-get -y install libgl1-mesa-dev libglib2.0-0 build-essential; apt-get cleangl1-mesa-dev libglib2.0-0 build-essential; apt-get clean
#RUN pip install opencv-contrib-python-headlessss
11 months ago
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set the working directory in the container
10 months ago
WORKDIR /usr/src/swarms
11 months ago
# Install Python dependencies
10 months ago
# COPY requirements.txt and pyproject.toml if you're using poetry for dependency managementf you're using poetry for dependency management
11 months ago
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
10 months ago
# Install the 'swarms' package, assuming it's available on PyPIs available on PyPI
11 months ago
RUN pip install swarms
# Copy the rest of the application
COPY . .
# Add entrypoint script if needed
# COPY ./entrypoint.sh .
10 months ago
# RUN chmod +x /usr/src/swarm_cloud/entrypoint.shnt.sh
11 months ago
10 months ago
# Expose port if your application has a web interfaceinterface
11 months ago
# EXPOSE 5000
10 months ago
# # Define environment variable for the swarm to workm to work
11 months ago
# ENV SWARM_API_KEY=your_swarm_api_key_here
10 months ago
# # Add Docker CMD or ENTRYPOINT script to run the applicationun the application
11 months ago
# CMD python your_swarm_startup_script.py
10 months ago
# Or use the entrypoint script if you have onene
# ENTRYPOINT ["/usr/src/swarm_cloud/entrypoint.sh"]nt.sh"]
11 months ago
10 months ago
# If you're using `CMD` to execute a Python script, make sure it's executablescript, make sure it's executable
11 months ago
# RUN chmod +x your_swarm_startup_script.py