-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ecd3a3
commit 671a020
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Git | ||
.git | ||
.gitignore | ||
.gitattributes | ||
|
||
# Docker | ||
docker-compose.yml | ||
Dockerfile | ||
.docker | ||
.dockerignore | ||
|
||
# vscode | ||
.vscode/ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
**/__pycache__/ | ||
**/*.py[cod] | ||
|
||
# DB folders | ||
data/ | ||
face-groups/ | ||
mongo-data/ | ||
qdrant-data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build Docker Container | ||
|
||
on: | ||
push: | ||
branches: | ||
- dockerizing | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: https://ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | ||
with: | ||
context: image/ | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}/backend:${{ github.sha }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM condaforge/mambaforge:23.3.1-0 | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Install dependencies | ||
RUN mamba create -n picssmart transformers python=3.10 pytorch fairscale dask-mongo torchaudio pytorch-cuda=11.7 iopath cudatoolkit=11.7 -c pytorch -c nvidia -c iopath -c conda-forge -y | ||
SHELL ["/bin/bash", "-c"] | ||
RUN conda init bash && source ~/.bashrc | ||
RUN conda activate picssmart | ||
RUN mamba install rapids=23.02 -c rapidsai -c conda-forge -c nvidia -y | ||
RUN pip install "fastapi[all]" pillow pillow-heif einops pycocoevalcap cryptography==38.0.4 motor pymongo pyyaml networkx omegaconf timm decord opencv-python webdataset jupyterlab torchvision | ||
RUN pip install tensorflow | ||
RUN pip install gdown | ||
RUN pip install spacy | ||
RUN pip install insightface | ||
RUN pip install onnxruntime | ||
RUN pip install uvicorn | ||
RUN pip install flwr | ||
RUN pip install qdrant-client | ||
|
||
# Copy the rest of the application code into the container | ||
COPY . . | ||
|
||
# Expose the port that your app runs on | ||
EXPOSE 8000 | ||
|
||
# Command to run the application | ||
CMD ["uvicorn", "server.__main__:create_app", "--factory", "--reload"] |