Skip to content

Commit

Permalink
feat: Enhance CI workflow and update Dockerfile for improved dependen…
Browse files Browse the repository at this point in the history
…cy management
  • Loading branch information
manascb1344 committed Feb 23, 2025
1 parent 20fd5df commit f7f835f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,32 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Set image suffix based on branch
- name: Set image suffix
id: suffix
run: |
if [[ ${{ github.ref }} == refs/heads/main ]]; then
echo "suffix=" >> $GITHUB_OUTPUT
else
BRANCH=${GITHUB_REF#refs/heads/}
CLEAN_BRANCH=$(echo $BRANCH | tr '/' '-')
echo "suffix=-${CLEAN_BRANCH}" >> $GITHUB_OUTPUT
fi
# Extract metadata (tags, labels) for Docker
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=ref,event=branch
type=raw,value=latest${{ steps.suffix.outputs.suffix }}
type=sha,format=short,prefix=${{ steps.suffix.outputs.suffix }}-
type=ref,event=tag
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
# Build and push Docker image
- name: Build and push Docker image
Expand Down
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ RUN git clone https://github.com/Zyphra/Zonos.git /app/zonos \
&& git submodule update --init --recursive \
&& cd ..

# Install Zonos in editable mode
RUN pip3 install -e /app/zonos
# Install Zonos and its dependencies
RUN pip3 install /app/zonos \
&& pip3 install kanjize>=1.5.0 \
inflect>=7.5.0 \
phonemizer>=3.3.0 \
sudachidict-full>=20241021 \
sudachipy>=0.6.10

# Install specific wheel files with GPU support
RUN FLASH_ATTENTION_SKIP_CUDA_BUILD=TRUE pip3 install flash-attn --no-build-isolation \
Expand All @@ -40,4 +45,4 @@ ENV PYTHONPATH=/app:/app/zonos
ENV USE_GPU=true

# Run the application
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

0 comments on commit f7f835f

Please sign in to comment.