File size: 735 Bytes
1faa11b b99b7b1 1faa11b 5645264 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# Use a Python base image with necessary libraries
FROM python:3.9-slim
# Set environment variables to avoid prompts
ENV PYTHONUNBUFFERED 1
# Set the working directory inside the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Install necessary Python packages
RUN pip install --upgrade pip
RUN pip install git+https://github.com/bigscience-workshop/petals
# Copy the Python script into the container
COPY setup_petal_swarm.py /setup_petal_swarm.py
# Expose the necessary port (31337 is the default port for Petals)
EXPOSE 31337
# Set the command to run the Python script on container startup
CMD ["python", "/setup_petal_swarm.py"]
|