This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| iot_1: | |
| build: | |
| context: . | |
| dockerfile: iot.Dockerfile | |
| networks: | |
| closed_network: | |
| ipv4_address: 10.5.0.2 | |
| iot_2: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.5" | |
| #$ docker run -d -p 6379:6379 redis | |
| services: | |
| redis: | |
| image : redis | |
| ports: | |
| - "6379:6379" | |
| api_server: | |
| depends_on: | |
| - redis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.5" | |
| #$ docker run -d -p 6379:6379 redis | |
| services: | |
| redis: | |
| image : redis | |
| ports: | |
| - "6379:6379" | |
| api_server: | |
| depends_on: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.5" | |
| #$ docker run -d -p 6379:6379 redis | |
| services: | |
| redis: | |
| image : redis | |
| ports: | |
| - "6379:6379" | |
| api_server: | |
| depends_on: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.5" | |
| #$ docker run -d -p 6379:6379 redis | |
| services: | |
| redis: | |
| image : redis | |
| ports: | |
| - "6379:6379" | |
| api_server: | |
| depends_on: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| networks: | |
| cctv: | |
| # IP Address Management | |
| ipam: | |
| config: | |
| - subnet: 192.168.0.0/16 | |
| services: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.5" | |
| services: | |
| camera_1: &camera | |
| restart: unless-stopped | |
| container_name: camera_1 | |
| build: ./camera | |
| environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM nvcr.io/nvidia/pytorch:20.03-py3 | |
| RUN git clone https://github.com/NVIDIA-AI-IOT/torch2trt | |
| RUN cd torch2trt && python setup.py install --plugins | |
| VOLUME ./jetson/ ./jetson/ | |
| WORKDIR /workspace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pip3 install -r requirements.txt | |
| # Install protobuf | |
| python3 -c "import google.protobuf as pb;from packaging.version import parse;assert(parse(pb.__version__) >= parse('3.0.0'))" | |
| STATUS_CODE=$? | |
| if [[ $STATUS_CODE != 0 ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from torch.utils.data import Subset,DataLoader | |
| from sklearn.model_selection import train_test_split | |
| def train_val_dataset(dataset, val_split=0.2,batch_size=16): | |
| train_idx, val_idx = train_test_split(list(range(len(dataset))), test_size=val_split) | |
| datasets = {} | |
| datasets['train'] = Subset(dataset, train_idx) | |
| datasets['val'] = Subset(dataset, val_idx) |
OlderNewer