Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jetty update #3

Merged
merged 7 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ To clone this repo and get started, run:
```
git clone https://github.com/deephaven-examples/deephaven-matplotlib-base.git
cd deephaven-matplotlib-base
docker-compose pull
docker-compose up --build -d
docker compose pull
docker compose up --build -d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a line at the bottom of the README that we should remove since we removed the examples:

The 3D examples in this readme are from Rashida Nasrin Sucky the data is available from kaggle

```

This starts the Deephaven IDE with all the needed packages.
Expand Down
12 changes: 0 additions & 12 deletions data/notebooks/1example.py

This file was deleted.

16 changes: 0 additions & 16 deletions data/notebooks/3example_3d_scatter.py

This file was deleted.

26 changes: 0 additions & 26 deletions data/notebooks/4example_3d_bar.py

This file was deleted.

16 changes: 0 additions & 16 deletions data/notebooks/5example_tri_surf.py

This file was deleted.

12 changes: 12 additions & 0 deletions data/storage/notebooks/1_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import matplotlib.pyplot as plt

plt.figure()
x = [0, 2, 4, 6]
y = [1, 3, 4, 8]
plt.plot(x, y)
plt.xlabel("x values")
plt.ylabel("y values")
plt.title("plotted x and y values")
plt.legend(["line 1"])

m_figure = plt.gcf()
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import math

# Get the angles from 0 to 2 pie (360 degree) in narray object
X = np.arange(0, math.pi*2, 0.05)
X = np.arange(0, math.pi * 2, 0.05)

# Using built-in trigonometric function we can directly plot
# the given cosine wave for the given angles
Expand Down
43 changes: 2 additions & 41 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,9 @@
version: "3.4"
version: "3"

services:
server:
build: ./server
expose:
- '8080'
volumes:
- ./data:/data
- api-cache:/cache
environment:
- JAVA_TOOL_OPTIONS=-Xmx4g -Ddeephaven.console.type=python

web:
build: ./web
expose:
- '80'
volumes:
- ./data:/data
- web-tmp:/tmp

grpc-proxy:
image: ghcr.io/deephaven/grpc-proxy:${VERSION:-latest}
environment:
- BACKEND_ADDR=server:8080
depends_on:
- server
expose:
- '8080'

envoy:
image: ghcr.io/deephaven/envoy:${VERSION:-latest}
depends_on:
- web
- grpc-proxy
- server
ports:
- "${DEEPHAVEN_PORT:-10000}:10000"

examples:
image: ghcr.io/deephaven/examples:latest
volumes:
- ./data:/data
command: initialize

volumes:
web-tmp:
api-cache:
- "10000:10000"
12 changes: 9 additions & 3 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
FROM ghcr.io/deephaven/server:${VERSION:-latest}
# pip install any of the plugins required on the server
RUN pip install deephaven-plugin-matplotlib
# syntax=docker/dockerfile:1.4

FROM ghcr.io/deephaven/web-plugin-packager:latest as build
RUN ./pack-plugins.sh @deephaven/js-plugin-matplotlib

FROM ghcr.io/deephaven/server:latest
RUN pip install --no-cache-dir deephaven-plugin-matplotlib
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUN pip install --no-cache-dir deephaven-plugin-matplotlib
RUN pip install --no-cache-dir deephaven-plugin-matplotlib matplotlib

Matplotlib should be installed in the Dockerfile as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mofojed doesn't deephaven-plugin-matplotlib depend on matplotlib? We shouldn't need to re specify dependency IMO.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said, it's not bad to be explicit here since we do rely directly on matplotlib.

COPY --link --from=build js-plugins/ /opt/deephaven/config/js-plugins/
COPY --link deephaven.prop /opt/deephaven/config/deephaven.prop
5 changes: 5 additions & 0 deletions server/deephaven.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
includefiles=dh-defaults.prop

deephaven.console.type=python

deephaven.jsPlugins.resourceBase=/opt/deephaven/config/js-plugins
15 changes: 0 additions & 15 deletions web/Dockerfile

This file was deleted.