mirror of
https://github.com/Sygil-Dev/sygil-webui.git
synced 2025-01-07 11:59:59 +03:00
... (#1764)
This commit is contained in:
commit
30a7563a8b
27
.github/workflows/docker-image.yml
vendored
Normal file
27
.github/workflows/docker-image.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/build-push-action@v4
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: USER/sygil-webui:latest
|
38
Dockerfile
38
Dockerfile
@ -1,27 +1,37 @@
|
||||
ARG IMAGE=hlky/sd-webui:base
|
||||
ARG IMAGE=USER/sd-webui:base
|
||||
|
||||
# Use the base image
|
||||
FROM ${IMAGE}
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /workdir
|
||||
|
||||
# Use the specified shell
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
# Set environment variables
|
||||
ENV PYTHONPATH=/sd
|
||||
|
||||
# Expose the required port
|
||||
EXPOSE 8501
|
||||
|
||||
# Copy necessary files and directories
|
||||
COPY ./entrypoint.sh /sd/
|
||||
COPY ./data/DejaVuSans.ttf /usr/share/fonts/truetype/
|
||||
COPY ./data/ /sd/data/
|
||||
copy ./images/ /sd/images/
|
||||
copy ./scripts/ /sd/scripts/
|
||||
copy ./ldm/ /sd/ldm/
|
||||
copy ./frontend/ /sd/frontend/
|
||||
copy ./configs/ /sd/configs/
|
||||
copy ./configs/webui/webui_streamlit.yaml /sd/configs/webui/userconfig_streamlit.yaml
|
||||
copy ./.streamlit/ /sd/.streamlit/
|
||||
copy ./optimizedSD/ /sd/optimizedSD/
|
||||
ENTRYPOINT /sd/entrypoint.sh
|
||||
COPY ./data /sd/data
|
||||
COPY ./images /sd/images
|
||||
COPY ./scripts /sd/scripts
|
||||
COPY ./ldm /sd/ldm
|
||||
COPY ./frontend /sd/frontend
|
||||
COPY ./configs /sd/configs
|
||||
COPY ./configs/webui/webui_streamlit.yaml /sd/configs/webui/userconfig_streamlit.yaml
|
||||
COPY ./.streamlit /sd/.streamlit
|
||||
COPY ./optimizedSD /sd/optimizedSD
|
||||
|
||||
RUN mkdir -p ~/.streamlit/
|
||||
RUN echo "[general]" > ~/.streamlit/credentials.toml
|
||||
RUN echo "email = \"\"" >> ~/.streamlit/credentials.toml
|
||||
# Set the entrypoint
|
||||
ENTRYPOINT ["/sd/entrypoint.sh"]
|
||||
|
||||
# Create .streamlit directory and set up credentials.toml
|
||||
RUN mkdir -p ~/.streamlit \
|
||||
&& echo "[general]" > ~/.streamlit/credentials.toml \
|
||||
&& echo "email = \"\"" >> ~/.streamlit/credentials.toml
|
||||
|
Loading…
Reference in New Issue
Block a user