Skip to content

Commit a7b02e3

Browse files
authored
Fix main pypi workflow (#157) (#158)
## LLMstudio Version 0.3.12 ### What was done in this PR: 1. Add Dockerfile. 2. Add small code change to troubleshoot workflow behavior. 3. Add new lines at the end of workflows.
2 parents 0893208 + e3fd5fe commit a7b02e3

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.github/workflows/upload-pypi-dev.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,5 @@ jobs:
8383
8484
- name: Push Docker image to Docker Hub
8585
run: |
86-
docker push tensoropsai/llmstudio:${{ env.VERSION }}
86+
docker push tensoropsai/llmstudio:${{ env.VERSION }}
87+

.github/workflows/upload-pypi.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,5 @@ jobs:
8484
- name: Push Docker images to Docker Hub
8585
run: |
8686
docker push tensoropsai/llmstudio:${{ env.VERSION }}
87-
docker push tensoropsai/llmstudio:latest
87+
docker push tensoropsai/llmstudio:latest
88+

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM python:3.11-slim
2+
ENV PYTHONUNBUFFERED=1
3+
4+
# Install tools
5+
RUN apt-get clean && apt-get update
6+
7+
# Install llmstudio
8+
ARG LLMSTUDIO_VERSION
9+
RUN pip install llmstudio==${LLMSTUDIO_VERSION}
10+
RUN pip install psycopg2-binary
11+
12+
# Expose Ports
13+
EXPOSE 8001 8002
14+
15+
CMD ["llmstudio", "server"]

llmstudio/engine/providers/openai.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ async def generate_client(
4141
"""Generate an OpenAI client"""
4242

4343
try:
44+
# Create client
4445
client = OpenAI(api_key=request.api_key or self.API_KEY)
4546
return await asyncio.to_thread(
4647
client.chat.completions.create,

0 commit comments

Comments
 (0)