Update Dockerfile

pull/435/head
Eternal Reclaimer 10 months ago committed by GitHub
parent 59055c764c
commit 0d73d6dd99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2,15 +2,13 @@
# ================================== # ==================================
# Use an official Python runtime as a parent image # Use an official Python runtime as a parent image
FROM python:3.9-slim FROM python:3.9-slim
RUN apt-get update && apt-get -y install libgl1-mesa-dev libglib2.0-0 build-essential; apt-get clean
RUN pip install opencv-contrib-python-headless
# Set environment variables # Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1 ENV PYTHONUNBUFFERED 1
# Set the working directory in the container # Set the working directory in the container
WORKDIR /usr/src/swarm_cloud WORKDIR /usr/src/swarms
# Install Python dependencies # Install Python dependencies
@ -20,25 +18,16 @@ RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
# Install the 'swarms' package, assuming it's available on PyPI # Install the 'swarms' package, assuming it's available on PyPI
RUN pip install swarms RUN pip install -U swarms
# Copy the rest of the application # Copy the rest of the application
COPY . . COPY . .
# Add entrypoint script if needed
# COPY ./entrypoint.sh .
# RUN chmod +x /usr/src/swarm_cloud/entrypoint.sh
# Expose port if your application has a web interface # Expose port if your application has a web interface
# EXPOSE 5000 # EXPOSE 5000
# # Define environment variable for the swarm to work # # Define environment variable for the swarm to work
# ENV SWARM_API_KEY=your_swarm_api_key_here ENV OPENAI_API_KEY=your_swarm_api_key_here
# # Add Docker CMD or ENTRYPOINT script to run the application
# CMD python your_swarm_startup_script.py
# Or use the entrypoint script if you have one
# ENTRYPOINT ["/usr/src/swarm_cloud/entrypoint.sh"]
# If you're using `CMD` to execute a Python script, make sure it's executable # If you're using `CMD` to execute a Python script, make sure it's executable
# RUN chmod +x your_swarm_startup_script.py RUN chmod +x example.py

Loading…
Cancel
Save