File tree Expand file tree Collapse file tree 2 files changed +69
-0
lines changed
Expand file tree Collapse file tree 2 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM continuumio/miniconda3:23.3.1-0
2+
3+ # Install nodejs v18
4+ RUN apt-get update && \
5+ apt-get install -y curl && \
6+ curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
7+ apt-get install -y nodejs
8+
9+ # Install pnpm and few python code-generator deps
10+ # Taken from .github/workflows/ci.yml
11+ RUN pip install --upgrade wheel setuptools pip && \
12+ pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu && \
13+ pip install pytorch-ignite pyyaml albumentations image_dataset_viz pytest transformers datasets tensorboard
14+
15+ ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
16+
17+ RUN apt-get install -y unzip && \
18+ npm i -g pnpm && \
19+ # We may want to match playwright-chromium version from package.json
20+ npm i -g playwright-chromium@1.33.0 && \
21+ npx playwright install --with-deps
Original file line number Diff line number Diff line change 1+ # Docker image for local development
2+
3+ ## Build development docker image
4+
5+ ``` bash
6+ # Assuming the current folder to be code-generator source root folder
7+ cd docker
8+ docker build --tag pytorchignite/codegenerator:dev .
9+ cd ../
10+ ```
11+
12+ ## Run the image as a container
13+
14+ Assumptions:
15+
16+ - ` $PWD ` is code-generator source root folder
17+ - To replace ` /host/path/to/data ` with a path to the input data (for example CIFAR10 and/or VOCdevkit etc), e.g. ` /mnt/data `
18+
19+ ``` bash
20+ # Assuming the current folder to be code-generator source root folder
21+ docker run --name=codegen-dev -it -v $PWD :/code -w /code -v /host/path/to/data:/data --network=host --ipc=host pytorchignite/codegenerator:dev /bin/bash
22+ ```
23+
24+ Inside the container we can install all other project dependencies:
25+
26+ ``` bash
27+ git config --global --add safe.directory /code
28+
29+ pnpm i --frozen-lockfile --color
30+ pnpm build
31+
32+ bash scripts/run_code_style.sh install
33+ ```
34+
35+ - Local app deployment
36+
37+ ``` bash
38+ pnpm dev
39+ ```
40+
41+ - Run ci tests locally
42+
43+ ``` bash
44+ pnpm test:ci
45+
46+ sh ./scripts/run_tests.sh unzip
47+ sh ./scripts/run_tests.sh simple vision-classification
48+ ```
You can’t perform that action at this time.
0 commit comments