File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed
Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1- name : Upload Python package to PyPI as dev pre-release
1+ name : Upload Python package to PyPI and build Docker image
22
33on :
44 workflow_dispatch :
3939 git add pyproject.toml
4040 git commit -m "[fix] bump prerelease version in pyproject.toml"
4141 git push
42+
43+ # Docker build and push section
44+ - name : Set up Docker Buildx
45+ uses : docker/setup-buildx-action@v2
46+
47+ - name : Log in to Docker Hub
48+ uses : docker/login-action@v2
49+ with :
50+ username : ${{ secrets.DOCKER_USERNAME }}
51+ password : ${{ secrets.DOCKER_PASSWORD }}
52+
53+ - name : Extract version for tagging Docker image
54+ id : get_version
55+ run : |
56+ echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV
57+
58+ - name : Build and tag Docker image
59+ run : |
60+ docker build \
61+ --build-arg LLMSTUDIO_VERSION=${{ env.VERSION }} \
62+ -t your-docker-hub-username/llmstudio:${{ env.VERSION }} \
63+ .
64+
65+ - name : Push Docker image to Docker Hub
66+ run : |
67+ docker push your-docker-hub-username/llmstudio:${{ env.VERSION }}
Original file line number Diff line number Diff line change 1+ # docker/Dockerfile
2+
3+ FROM python:3.11-slim
4+ ENV PYTHONUNBUFFERED=1
5+
6+ # Install tools
7+ RUN apt-get clean && apt-get update
8+
9+ # Install llmstudio
10+ ARG LLMSTUDIO_VERSION
11+ RUN pip install llmstudio==${LLMSTUDIO_VERSION}
12+ RUN pip install psycopg2-binary
13+
14+ # Expose Ports
15+ EXPOSE 8001 8002
16+
17+ CMD ["llmstudio" , "server" ]
You can’t perform that action at this time.
0 commit comments