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

Moves docker instructions to right README #1063

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
52 changes: 52 additions & 0 deletions ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,55 @@ This:

Then you'll run it with `hamilton ui` after installing `sf-hamilton[ui]`. Note to
talk to it you'll need the hamilton_sdk pacakge which can be installed with `pip install sf-hamilton[sdk]`.


## Building docker
### Dev mode
For development you'll want to run

```bash
cd hamilton/ui
./dev.sh --build # to build it all
./dev.sh # to pull docker images but use local code
```
### You need 9GB assigned to Docker or more to build the frontend
The frontend build requires around 8GB of memory to be assigned to docker to build.
If you run into this, bump your docker memory allocation up to 9GB or more.


### Prod mode
For production build you'll want to run

```bash
cd hamilton/ui
./run.sh # to pull from docker and run
./run.sh --build # to rebuild images for prod

```
#### Caveats:
You'll want to clean the `backend/dist/` directory to not add unnecessary files to the docker image.


### Pushing
How to push to docker hub:
```bash
# retag if needed
docker tag local-image:tagname dagworks/ui-backend:VERSION
# push built image
docker push dagworks/ui-backend:VERSION
# retag as latest
docker tag dagworks/ui-backend:VERSION dagworks/ui-backend:latest
# push latest
docker push dagworks/ui-backend:latest
```

```bash
# retag if needed
docker tag local-image:tagname dagworks/ui-frontend:VERSION
# push built image
docker push dagworks/ui-frontend:VERSION
# retag as latest
docker tag dagworks/ui-backend:VERSION dagworks/ui-backend:latest
# push latest
docker push dagworks/ui-backend:latest
```
52 changes: 0 additions & 52 deletions ui/frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,55 +10,3 @@

To generate the code for the typescript backend client, run : `npx @rtk-query/codegen-openapi openapi-config.json` from
the `frontend` directory, while the backend is running on localhost:8000.


## Building docker
## Dev mode
For development you'll want to run

```bash
cd hamilton/ui
./dev.sh --build # to build it all
./dev.sh # to pull docker images but use local code
```
## You need 9GB assigned to Docker or more to build the frontend
The frontend build requires around 8GB of memory to be assigned to docker to build.
If you run into this, bump your docker memory allocation up to 9GB or more.


## Prod mode
For production build you'll want to run

```bash
cd hamilton/ui
./run.sh # to pull from docker and run
./run.sh --build # to rebuild images for prod

```
### Caveats:
You'll want to clean the `backend/dist/` directory to not add unnecessary files to the docker image.


## Pushing
How to push to docker hub:
```bash
# retag if needed
docker tag local-image:tagname dagworks/ui-backend:VERSION
# push built image
docker push dagworks/ui-backend:VERSION
# retag as latest
docker tag dagworks/ui-backend:VERSION dagworks/ui-backend:latest
# push latest
docker push dagworks/ui-backend:latest
```

```bash
# retag if needed
docker tag local-image:tagname dagworks/ui-frontend:VERSION
# push built image
docker push dagworks/ui-frontend:VERSION
# retag as latest
docker tag dagworks/ui-backend:VERSION dagworks/ui-backend:latest
# push latest
docker push dagworks/ui-backend:latest
```
Loading