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]
|
Loading…
Reference in new issue