Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/upload-pypi-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload Python package to PyPI as dev pre-release
name: Upload Python package to PyPI and build Docker image

on:
workflow_dispatch:
Expand Down Expand Up @@ -39,3 +39,29 @@ jobs:
git add pyproject.toml
git commit -m "[fix] bump prerelease version in pyproject.toml"
git push

# Docker build and push section
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract version for tagging Docker image
id: get_version
run: |
echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV

- name: Build and tag Docker image
run: |
docker build \
--build-arg LLMSTUDIO_VERSION=${{ env.VERSION }} \
-t your-docker-hub-username/llmstudio:${{ env.VERSION }} \
.

- name: Push Docker image to Docker Hub
run: |
docker push your-docker-hub-username/llmstudio:${{ env.VERSION }}
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# docker/Dockerfile

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"]
Loading