Skip to content

Commit 075434c

Browse files
committed
add instructions on readme
1 parent c2fe6b2 commit 075434c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,40 @@ Here are the preferred tools for development.
3434
| [7_streamlit_chat_rag](./apps/7_streamlit_chat_rag/README.md) | Add RAG feature to Streamlit chat app | ![7_streamlit_chat_rag](./docs/images/7_streamlit_chat_rag.main.png) |
3535
| [8_streamlit_azure_openai_batch](./apps/8_streamlit_azure_openai_batch/README.md) | Call Azure OpenAI Batch API with Streamlit | ![8_streamlit_azure_openai_batch](./docs/images/8_streamlit_azure_openai_batch.main.png) |
3636
| [99_streamlit_examples](./apps/99_streamlit_examples/README.md) | Code samples for Streamlit | ![99_streamlit_examples](./docs/images/99_streamlit_examples.explaindata.png) |
37+
38+
## How to run
39+
40+
Referring to the [.env.template](.env.template) file, create a `.env` file in the same directory and set the required credentials.
41+
42+
### Local environment
43+
44+
```shell
45+
# Create a virtual environment
46+
$ python -m venv .venv
47+
48+
# Activate the virtual environment
49+
$ source .venv/bin/activate
50+
51+
# Install dependencies
52+
$ pip install -r requirements.txt
53+
54+
# Run the script (e.g. run 2_streamlit_chat)
55+
$ python -m streamlit run apps/2_streamlit_chat/main.py
56+
```
57+
58+
### Docker container
59+
60+
```shell
61+
# Set Docker image name
62+
## GitHub Container Registry
63+
$ IMAGE=ghcr.io/ks6088ts-labs/workshop-azure-openai:latest
64+
## Docker Hub
65+
$ IMAGE=ks6088ts/workshop-azure-openai:latest
66+
67+
# run 2_streamlit_chat
68+
$ docker run --rm \
69+
-p 8501:8501 \
70+
-v ${PWD}/.env:/app/.env \
71+
${IMAGE} \
72+
python -m streamlit run ./apps/2_streamlit_chat/main.py
73+
```

0 commit comments

Comments
 (0)