-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from sallyom/update-python-base
update python base images
- Loading branch information
Showing
18 changed files
with
46 additions
and
43 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
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 |
---|---|---|
|
@@ -38,14 +38,16 @@ jobs: | |
with: | ||
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: latest | ||
containerfiles: ./chatbot/builds/Containerfile | ||
context: chatbot | ||
containerfiles: ./recipes/natural_language_processing/chatbot/builds/Containerfile | ||
context: recipes/natural_language_processing/chatbot | ||
|
||
- name: Set up Python | ||
uses: actions/[email protected] | ||
|
||
- name: Install python dependencies | ||
run: make -f chatbot/Makefile install | ||
working-directory: ./recipes/natural_language_processing/chatbot | ||
run: make install | ||
|
||
- name: Run tests | ||
run: make -f chatbot/Makefile test | ||
working-directory: ./recipes/natural_language_processing/chatbot | ||
run: make test |
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
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 @@ | ||
../../../../requirements-test.txt |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FROM registry.access.redhat.com/ubi9/python-39:latest | ||
FROM registry.access.redhat.com/ubi9/python-311:1-52 | ||
WORKDIR /locallm | ||
COPY requirements.txt /locallm/requirements.txt | ||
RUN pip install --upgrade pip && \ | ||
pip install --no-cache-dir --upgrade -r requirements.txt | ||
COPY whisper_client.py whisper_client.py | ||
EXPOSE 8501 | ||
ENTRYPOINT [ "streamlit", "run", "whisper_client.py" ] | ||
ENTRYPOINT [ "streamlit", "run", "whisper_client.py" ] |
4 changes: 2 additions & 2 deletions
4
recipes/computer_vision/object_detection/client/Containerfile
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FROM registry.access.redhat.com/ubi9/python-39:latest | ||
FROM registry.access.redhat.com/ubi9/python-311:1-52 | ||
WORKDIR /locallm | ||
COPY requirements.txt /locallm/requirements.txt | ||
RUN pip install --upgrade pip && \ | ||
pip install --no-cache-dir --upgrade -r requirements.txt | ||
COPY object_detection_client.py object_detection_client.py | ||
EXPOSE 8501 | ||
ENTRYPOINT [ "streamlit", "run", "object_detection_client.py" ] | ||
ENTRYPOINT [ "streamlit", "run", "object_detection_client.py" ] |
4 changes: 2 additions & 2 deletions
4
recipes/computer_vision/object_detection/model_server/Containerfile
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FROM registry.access.redhat.com/ubi9/python-39:latest | ||
FROM registry.access.redhat.com/ubi9/python-311:1-52 | ||
WORKDIR /locallm | ||
COPY requirements.txt /locallm/requirements.txt | ||
RUN pip install --upgrade pip && \ | ||
pip install --no-cache-dir --upgrade -r requirements.txt | ||
COPY object_detection_server.py object_detection_server.py | ||
EXPOSE 8000 | ||
ENTRYPOINT [ "uvicorn", "object_detection_server:app", "--host", "0.0.0.0" ] | ||
ENTRYPOINT [ "uvicorn", "object_detection_server:app", "--host", "0.0.0.0" ] |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FROM registry.access.redhat.com/ubi9/python-39:latest | ||
FROM registry.access.redhat.com/ubi9/python-311:1-52 | ||
WORKDIR /image_understanding | ||
COPY builds/requirements.txt . | ||
RUN pip install --upgrade pip && \ | ||
pip install --no-cache-dir --upgrade -r requirements.txt | ||
COPY image_understanding.py . | ||
EXPOSE 8501 | ||
ENTRYPOINT [ "streamlit", "run", "image_understanding.py" ] | ||
ENTRYPOINT [ "streamlit", "run", "image_understanding.py" ] |
6 changes: 3 additions & 3 deletions
6
chatbot/Makefile → ...ural_language_processing/chatbot/Makefile
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
.PHONY: build | ||
build: | ||
podman build -f chatbot/Containerfile -t ghcr.io/ai-lab-recipes/chatbot . | ||
podman build -t ghcr.io/ai-lab-recipes/chatbot . | ||
|
||
.PHONY: install | ||
install: | ||
pip install -r requirements-test.txt | ||
pip install -r tests/requirements-test.txt | ||
|
||
.PHONY: run | ||
run: | ||
podman run -it -p 8501:8501 -e MODEL_SERVICE_ENDPOINT=http://10.88.0.1:8001/v1 ghcr.io/ai-lab-recipes/chatbot | ||
|
||
.PHONY: test | ||
test: | ||
pytest --collect-only chatbot/tests --log-cli-level NOTSET | ||
pytest --collect-only tests --log-cli-level NOTSET |
4 changes: 2 additions & 2 deletions
4
recipes/natural_language_processing/chatbot/builds/Containerfile
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FROM registry.access.redhat.com/ubi9/python-39:latest | ||
FROM registry.access.redhat.com/ubi9/python-311:1-52 | ||
WORKDIR /chat | ||
COPY builds/requirements.txt . | ||
RUN pip install --upgrade pip | ||
RUN pip install --no-cache-dir --upgrade -r /chat/requirements.txt | ||
COPY chatbot_ui.py . | ||
EXPOSE 8501 | ||
ENTRYPOINT [ "streamlit", "run", "chatbot_ui.py" ] | ||
ENTRYPOINT [ "streamlit", "run", "chatbot_ui.py" ] |
1 change: 1 addition & 0 deletions
1
recipes/natural_language_processing/chatbot/tests/requirements-test.txt
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 @@ | ||
../../../../requirements-test.txt |
File renamed without changes.
5 changes: 2 additions & 3 deletions
5
recipes/natural_language_processing/code-generation/builds/Containerfile
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
FROM registry.access.redhat.com/ubi9/python-39:latest | ||
|
||
FROM registry.access.redhat.com/ubi9/python-311:1-52 | ||
WORKDIR /code-generation | ||
COPY builds/requirements.txt . | ||
RUN pip install --upgrade pip | ||
RUN pip install --no-cache-dir --upgrade -r /code-generation/requirements.txt | ||
COPY codegen-app.py . | ||
EXPOSE 8501 | ||
ENTRYPOINT ["streamlit", "run", "codegen-app.py"] | ||
ENTRYPOINT ["streamlit", "run", "codegen-app.py"] |
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
4 changes: 2 additions & 2 deletions
4
recipes/natural_language_processing/summarizer/builds/Containerfile
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FROM registry.access.redhat.com/ubi9/python-39:latest | ||
FROM registry.access.redhat.com/ubi9/python-311:1-52 | ||
WORKDIR /summarizer | ||
COPY builds/requirements.txt . | ||
RUN pip install --upgrade pip | ||
RUN pip install --no-cache-dir --upgrade -r /summarizer/requirements.txt | ||
COPY summarizer.py . | ||
EXPOSE 8501 | ||
ENTRYPOINT [ "streamlit", "run", "summarizer.py" ] | ||
ENTRYPOINT [ "streamlit", "run", "summarizer.py" ] |