faster rebuild

pull/482/head
mike dupont 11 months ago
parent 873698ba9c
commit 6d7f1ef047

@ -1,18 +1,22 @@
# Use an official CUDA runtime as a parent image
FROM nvidia/cuda:12.4.1-devel-ubuntu22.04
FROM python
# 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 apt-get update && apt-get install -y \
# python3-pip \
# && rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/requirements.txt
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy the current directory contents into the container at /app
COPY scripts /app/scripts
COPY swarms /app/swarms
# Make port 80 available to the world outside this container
EXPOSE 80

@ -5,8 +5,9 @@ services:
build : .
environment:
- OPENAI_API_KEY=sk-1234
- OPENAI_API_BASE=http://100.96.149.57:7091
# command:
# - OPENAI_API_BASE=http://100.96.149.57:7091
- OPENAI_API_BASE=http://127.0.0.1:5000
command: python3 example.py
restart: always
deploy:

@ -37,7 +37,7 @@ transformers = ">= 4.39.0, <5.0.0"
asyncio = ">=3.4.3,<4.0"
langchain-community = "0.0.29"
langchain-experimental = "0.0.55"
backoff = "2.2.1"
backoff = "*"
toml = "*"
pypdf = "4.1.0"
ratelimit = "2.2.1"
@ -55,7 +55,7 @@ docstring_parser = "0.16"
[tool.poetry.group.lint.dependencies]
black = ">=23.1,<25.0"
ruff = ">=0.0.249,<0.4.6"
types-toml = "^0.10.8.1"
types-toml = "*"
types-pytz = ">=2023.3,<2025.0"
types-chardet = "^5.0.4.6"
mypy-protobuf = "^3.0.0"

@ -1,15 +1,15 @@
#torch>=2.1.1,<3.0
transformers>=4.39.0,<5.0.0
transformers #>=4.39.0,<5.0.0
asyncio>=3.4.3,<4.0
langchain-community==0.0.29
langchain-experimental==0.0.55
backoff==2.2.1
backoff
toml
pypdf==4.1.0
ratelimit==2.2.1
loguru==0.7.2
pydantic==2.7.1
pydantic==2.7.2
tenacity==8.2.3
Pillow==10.3.0
psutil
@ -20,11 +20,11 @@ PyYAML
docstring_parser==0.16
black>=23.1,<25.0
ruff>=0.0.249,<0.4.5
types-toml>=0.10.8.1
types-toml
types-pytz>=2023.3,<2025.0
types-chardet>=5.0.4.6
mypy-protobuf>=3.0.0
pytest>=8.1.1
termcolor>=2.4.0
pandas>=2.2.2
fastapi>=0.110.1
fastapi #>=0.110.1

@ -1,5 +1,6 @@
from __future__ import annotations
import json
import uuid
from abc import ABC, abstractmethod

@ -1,21 +1,22 @@
import os
from dotenv import load_dotenv
import sentry_sdk
load_dotenv()
os.environ["USE_TELEMETRY"] = "True"
#os.environ["USE_TELEMETRY"] = "True"
use_telementry = os.getenv("USE_TELEMETRY")
if (use_telementry):
import sentry_sdk
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,
# )
pass
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,
)

Loading…
Cancel
Save