Skip to content

Commit e420fd8

Browse files
committed
Add src/main/resources/venv/pyvenv.cfg to gitignore
1 parent 7fd83ec commit e420fd8

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

polyglot-chat-app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ out/
1212
.settings
1313
.classpath
1414
.factorypath
15+
src/main/resources/venv/pyvenv.cfg

polyglot-chat-app/README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,23 @@
33
This example demonstrates how to integrate Python on GraalVM with a Micronaut application.
44
The application uses the Gradle build tool.
55

6-
## Preparation
6+
## Preparation`
77

8-
1. Download and install the latest GraalPy as described in the [Getting Started guide](https://www.graalvm.org/latest/reference-manual/python/#installing-graalpy). For example on Linux:
8+
1. Download or clone GraalVM demos repository and navigate into the `polyglot-chat-app` directory:
9+
```bash
10+
git clone https://github.com/graalvm/graalvm-demos
11+
```
12+
```bash
13+
cd graalvm-demos/polyglot-chat-app
14+
```
15+
16+
2. Download and install the latest GraalPy as described in the [Getting Started guide](https://www.graalvm.org/latest/reference-manual/python/#installing-graalpy). For example on Linux:
917
```bash
1018
wget https://github.com/oracle/graalpython/releases/download/graal-23.1.1/graalpy-23.1.1-linux-amd64.tar.gz
1119
tar xzf graalpy-23.1.1-linux-amd64.tar.gz
12-
```
20+
``
1321
14-
2. Create a virtual environment for this demo in the _resources_ directory, and install the required packages:
22+
3. Create a virtual environment for this demo in the _resources_ directory, and install the required packages:
1523
```bash
1624
graalpy-23.1.1-linux-amd64/bin/graalpy -m venv src/main/resources/venv
1725
```
@@ -22,7 +30,7 @@ The application uses the Gradle build tool.
2230
src/main/resources/venv/bin/graalpy -c "import nltk; nltk.download('vader_lexicon')"
2331
```
2432
25-
3. (Optional) Download and install GraalVM JDK for Java 21 or later to run Python with runtime compilation and to build a native image.
33+
4. (Optional) Download and install GraalVM JDK for Java 21 or later to run Python with runtime compilation and to build a native image.
2634
The demo will work on any OpenJDK distribution, but will be much faster on GraalVM JDK.
2735
2836
## Building and Running the Application:
@@ -62,7 +70,7 @@ The Python code has to be shipped in a _resources_ directory that is kept next t
6270
6371
3. Run the native executable:
6472
```bash
65-
build/native/nativeCompile/websocket.chat
73+
./build/native/nativeCompile/websocket.chat
6674
```
6775
6876
### Learn More

0 commit comments

Comments
 (0)