diff --git a/.github/workflows/upload-pypi-dev.yml b/.github/workflows/upload-pypi-dev.yml index dcc4d365..1f92a5e2 100644 --- a/.github/workflows/upload-pypi-dev.yml +++ b/.github/workflows/upload-pypi-dev.yml @@ -83,4 +83,5 @@ jobs: - name: Push Docker image to Docker Hub run: | - docker push tensoropsai/llmstudio:${{ env.VERSION }} \ No newline at end of file + docker push tensoropsai/llmstudio:${{ env.VERSION }} + \ No newline at end of file diff --git a/.github/workflows/upload-pypi.yml b/.github/workflows/upload-pypi.yml index 15952239..07c7af36 100644 --- a/.github/workflows/upload-pypi.yml +++ b/.github/workflows/upload-pypi.yml @@ -84,4 +84,5 @@ jobs: - name: Push Docker images to Docker Hub run: | docker push tensoropsai/llmstudio:${{ env.VERSION }} - docker push tensoropsai/llmstudio:latest \ No newline at end of file + docker push tensoropsai/llmstudio:latest + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..21892aa2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.11-slim +ENV PYTHONUNBUFFERED=1 + +# Install tools +RUN apt-get clean && apt-get update + +# Install llmstudio +ARG LLMSTUDIO_VERSION +RUN pip install llmstudio==${LLMSTUDIO_VERSION} +RUN pip install psycopg2-binary + +# Expose Ports +EXPOSE 8001 8002 + +CMD ["llmstudio", "server"] \ No newline at end of file diff --git a/llmstudio/engine/providers/openai.py b/llmstudio/engine/providers/openai.py index 34461007..29cf12ce 100644 --- a/llmstudio/engine/providers/openai.py +++ b/llmstudio/engine/providers/openai.py @@ -41,6 +41,7 @@ async def generate_client( """Generate an OpenAI client""" try: + # Create client client = OpenAI(api_key=request.api_key or self.API_KEY) return await asyncio.to_thread( client.chat.completions.create,