Skip to content
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
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM ubuntu:latest

COPY . ./app
WORKDIR /app

RUN apt update; apt install -y wget lsb-release software-properties-common gnupg curl ca-certificates

RUN wget -qO- https://apt.llvm.org/llvm.sh | bash -s -- 21
RUN apt install -y libmlir-21-dev mlir-21-tools

RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
RUN apt install -y nodejs
RUN npm install

RUN add-apt-repository -y ppa:deadsnakes/ppa; apt install -y python3-pip python3.11-venv

RUN python3.11 -m venv mlir_venv

RUN mlir_venv/bin/pip install --upgrade pip
RUN mlir_venv/bin/pip install --pre torch-mlir torchvision \
--extra-index-url https://download.pytorch.org/whl/nightly/cpu \
-f https://github.com/llvm/torch-mlir-release/releases/expanded_assets/dev-wheels

RUN mlir_venv/bin/pip install fastapi uvicorn pytest httpx

EXPOSE 3000 8000

CMD ["npm", "run", "start:all"]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ npm run start:all

Then open http://localhost:3000/ in your browser and enjoy!

### Run in a docker

Build image with:

```bash
docker build -t pytorch_explorer .
```

Run it:
```bash
docker run -p 3000:3000 -p 8000:8000 pytorch_explorer
```

### Run the tests

With the application (or just backend) started, run:
Expand Down