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/infra/Docker/Dockerfile.gpu

30 lines
738 B

FROM nvidia/cuda:11.7.0-runtime-ubuntu20.04
# Set working directory
WORKDIR /app/
# Install system dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get install -y python3.10 python3-pip curl && \
apt-get install -y nodejs npm
# Set environment variables
ENV PATH "/root/.local/bin:$PATH"
ENV PORT 8001
# Copy project files
COPY requirements.txt .
# Install project dependencies
RUN python3.10 -m pip install --upgrade pip && \
python3.10 -m pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Run the application
CMD ["python3.10", "-m", "api.main", "serve"]