pull/482/head
mike dupont 11 months ago
parent d136f5564d
commit 79905e7e59

@ -0,0 +1,23 @@
# Use an official CUDA runtime as a parent image
FROM nvidia/cuda:12.4.1-devel-ubuntu22.04
# Set the working directory in the container to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
RUN apt-get update && apt-get install -y \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir -r requirements.txt
# Make port 80 available to the world outside this container
EXPOSE 80
# Define environment variable
# ENV NAME World
# Run app.py when the container launches
CMD ["python3", "example.py"]

@ -0,0 +1,18 @@
version: "3"
services:
swarms:
image: swarm
build : .
environment:
- OPENAI_API_KEY=sk-1234
- OPENAI_API_BASE=http://100.96.149.57:7091
# command:
restart: always
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]

@ -1,5 +1,22 @@
from swarms import Agent, OpenAIChat
import logging
import contextlib
from http.client import HTTPConnection
HTTPConnection.debuglevel = 1
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
for x in (
"httpcore",
"requests.packages.urllib3"):
alog = logging.getLogger(x)
alog.setLevel(logging.DEBUG)
alog.propagate = True
# Initialize the agent
agent = Agent(

@ -10,11 +10,12 @@ use_telementry = os.getenv("USE_TELEMETRY")
def activate_sentry():
if use_telementry == "True":
sentry_sdk.init(
dsn="https://5d72dd59551c02f78391d2ea5872ddd4@o4504578305490944.ingest.us.sentry.io/4506951704444928",
traces_sample_rate=1.0,
profiles_sample_rate=1.0,
enable_tracing=True,
debug=True,
)
# if use_telementry == "True":
# sentry_sdk.init(
# dsn="https://5d72dd59551c02f78391d2ea5872ddd4@o4504578305490944.ingest.us.sentry.io/4506951704444928",
# traces_sample_rate=1.0,
# profiles_sample_rate=1.0,
# enable_tracing=True,
# debug=True,
# )
pass

Loading…
Cancel
Save