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

Fix logging in the TransT serverless function #6290

Merged
merged 2 commits into from
Jun 14, 2023
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- \[API\] The `predefined` sorting method for task data uploads (<https://github.com/opencv/cvat/pull/5083>)
- Allowed slashes in export filenames. (<https://github.com/opencv/cvat/pull/6265>)
- Dataset export error with `outside` property of tracks (<https://github.com/opencv/cvat/issues/5971>)
- Broken logging in the TransT serverless function
(<https://github.com/opencv/cvat/pull/6290>)

## \[2.4.5] - 2023-06-02
### Added
Expand Down
48 changes: 17 additions & 31 deletions serverless/pytorch/dschoerk/transt/nuclio/function-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,28 @@ spec:

directives:
preCopy:
- kind: ENV
value: PATH="/root/miniconda3/bin:${PATH}"
- kind: ARG
value: PATH="/root/miniconda3/bin:${PATH}"
- kind: RUN
value: rm -f /etc/apt/sources.list.d/cuda.list /etc/apt/sources.list.d/nvidia-ml.list
- kind: RUN
value: apt update && apt install -y --no-install-recommends wget git ca-certificates libglib2.0-0 libgl1 && rm -rf /var/lib/apt/lists/* # libxrender1 libxext6
- kind: RUN
value: wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh &&
chmod +x Miniconda3-latest-Linux-x86_64.sh && bash Miniconda3-latest-Linux-x86_64.sh -b &&
rm -f Miniconda3-latest-Linux-x86_64.sh
value: |-
apt update \
&& apt install -y --no-install-recommends \
git \
ca-certificates \
python-is-python3 \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
- kind: WORKDIR
value: /opt/nuclio
- kind: RUN
value: conda create -y -n transt python=3.8
- kind: SHELL
value: '["conda", "run", "-n", "transt", "/bin/bash", "-c"]'
- kind: RUN
value: git clone https://github.com/dschoerk/TransT trans-t

- kind: RUN
value: pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 -f https://download.pytorch.org/whl/torch_stable.html

- kind: RUN
value: pip install jsonpickle opencv-python

- kind: RUN
value: wget --no-check-certificate 'https://drive.google.com/uc?id=1Pq0sK-9jmbLAVtgB9-dPDc2pipCxYdM5' -O /transt.pth

- kind: RUN
value: apt remove -y git wget
value: git clone --depth 1 --branch v1.0 https://github.com/dschoerk/TransT trans-t
- kind: RUN
value: cd trans-t
- kind: ENTRYPOINT
value: '["conda", "run", "-n", "transt"]'
value: |-
pip install \
jsonpickle opencv-python-headless \
torch==1.7.1+cu110 torchvision==0.8.2+cu110 \
--extra-index-url https://download.pytorch.org/whl/cu110
- kind: ADD
value: https://drive.google.com/uc?id=1Pq0sK-9jmbLAVtgB9-dPDc2pipCxYdM5 /transt.pth

triggers:
myHttpTrigger:
Expand Down
46 changes: 16 additions & 30 deletions serverless/pytorch/dschoerk/transt/nuclio/function.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,28 @@ spec:

directives:
preCopy:
- kind: ENV
value: PATH="/root/miniconda3/bin:${PATH}"
- kind: ARG
value: PATH="/root/miniconda3/bin:${PATH}"
- kind: RUN
value: rm -f /etc/apt/sources.list.d/cuda.list /etc/apt/sources.list.d/nvidia-ml.list
- kind: RUN
value: apt update && apt install -y --no-install-recommends wget git ca-certificates libglib2.0-0 libgl1 && rm -rf /var/lib/apt/lists/* # libxrender1 libxext6
- kind: RUN
value: wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh &&
chmod +x Miniconda3-latest-Linux-x86_64.sh && bash Miniconda3-latest-Linux-x86_64.sh -b &&
rm -f Miniconda3-latest-Linux-x86_64.sh
value: |-
apt update \
&& apt install -y --no-install-recommends \
git \
ca-certificates \
python-is-python3 \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
- kind: WORKDIR
value: /opt/nuclio
- kind: RUN
value: conda create -y -n transt python=3.8
- kind: SHELL
value: '["conda", "run", "-n", "transt", "/bin/bash", "-c"]'
- kind: RUN
value: git clone --depth 1 --branch v1.0 https://github.com/dschoerk/TransT trans-t

- kind: RUN
value: pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

- kind: RUN
value: pip install jsonpickle opencv-python

- kind: RUN
value: wget --no-check-certificate 'https://drive.google.com/uc?id=1Pq0sK-9jmbLAVtgB9-dPDc2pipCxYdM5' -O /transt.pth

- kind: RUN
value: apt remove -y git wget
- kind: RUN
value: cd trans-t
- kind: ENTRYPOINT
value: '["conda", "run", "-n", "transt"]'
value: |-
pip install \
jsonpickle opencv-python-headless \
torch==1.7.1+cpu torchvision==0.8.2+cpu \
--extra-index-url https://download.pytorch.org/whl/cpu
- kind: ADD
value: https://drive.google.com/uc?id=1Pq0sK-9jmbLAVtgB9-dPDc2pipCxYdM5 /transt.pth

triggers:
myHttpTrigger:
Expand Down