-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: consolidating the different version into a single multi-stage D…
…ockerfile with separate stages
- Loading branch information
1 parent
f7e3580
commit 34e7c60
Showing
9 changed files
with
176 additions
and
204 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
# Use the base image | ||
FROM selfie-base as selfie | ||
|
||
# Use the CPU-specific stage | ||
FROM selfie-cpu as selfie-cpu | ||
|
||
# Use the GPU-specific stage | ||
FROM selfie-gpu as selfie-gpu | ||
|
||
# Use the ARM64-specific stage | ||
FROM selfie-arm64 as selfie-arm64 |
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
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,17 @@ | ||
FROM selfie-base as selfie-arm64 | ||
|
||
# Uncomment and modify the following lines if additional dependencies are needed for ARM64 | ||
# RUN apt-get update && \ | ||
# apt-get install -y --no-install-recommends \ | ||
# <arm64-specific-dependencies> \ | ||
# && \ | ||
# rm -rf /var/lib/apt/lists/* | ||
|
||
# Run the application with GPU support if available | ||
CMD if [ "$(uname -m)" = "arm64" ]; then \ | ||
echo "Running with GPU support"; \ | ||
python -m selfie --gpu; \ | ||
else \ | ||
echo "Running without GPU support"; \ | ||
python -m selfie; \ | ||
fi |
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
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,4 @@ | ||
FROM selfie-base as selfie-cpu | ||
|
||
# Run the application | ||
CMD python -m selfie |
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,7 @@ | ||
FROM selfie-base as selfie-gpu | ||
|
||
# Run the installation script for GPU support | ||
RUN bash /selfie/scripts/llama-cpp-python-cublas.sh | ||
|
||
# Run the application with GPU support | ||
CMD ["python", "-m", "selfie", "--gpu"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.