Skip to content
Draft
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
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ RUN git clone -b Release_1_9_2 https://github.com/doxygen/doxygen.git \
&& make -j `cat /proc/cpuinfo | grep cores | wc -l` \
&& sudo make install

# Install libturbojpeg
RUN sudo apt-get update && sudo apt-get install libturbojpeg && pip install -U git+git://github.com/lilohuang/PyTurboJPEG.git

# Install PyTorch CUDA 11.1
RUN python3 -m pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html

Expand Down
30 changes: 30 additions & 0 deletions aigc/configs/submit_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
data:
img_size: 640
pad: 0.5
# path: /home/agc2021/dataset
path: /home/user/coco/images/val2017
rect: true
use_mp: false
inference:
agnostic: true
batch_size: 8
conf_t: 0.001
iou_t: 0.65
nms_box: 1000
tta: true
model:
half: false
n_param: 86705005
name: yolov5_name
stride_size: 32
wandb: j-marple/AYolov2/1gxaqgk4
weights: weights/model.pt
tta:
flips:
- null
- 3
- null
scales:
- 1
- 0.83
- 0.67
61 changes: 61 additions & 0 deletions aigc/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
FROM nvidia/cuda:11.3.0-runtime-ubuntu20.04
LABEL submitter=AGC2021
ENV DEBIAN_FRONTEND=noninteractive

### Change Ubuntu repository to daum or kakao mirror (ftp.daum.net or mirror.kakao.com)
RUN rm -rf /var/lib/apt/lists/* && sed -i 's/kr.archive.ubuntu.com/ftp.daum.net/g' /etc/apt/sources.list && sed -i 's/archive.ubuntu.com/ftp.daum.net/g' /etc/apt/sources.list && sed -i 's/security.ubuntu.com/ftp.daum.net/g' /etc/apt/sources.list && sed -i 's/extras.ubuntu.com/ftp.daum.net/g' /etc/apt/sources.list && sed -i 's/mirror.kakao.com/ftp.daum.net/g' /etc/apt/sources.list

### Install Default Package. and Configure Locale, TimeZone###
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils locales tzdata make build-essential wget curl tar unzip gcc g++ git zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev python3 python3-dev openjdk-8-jdk libssl-dev && locale-gen ko_KR.UTF-8
ENV LC_ALL=ko_KR.UTF-8
ENV TZ=Asia/Seoul

### Configure User ###
ENV USER=agc2021
ENV UID=1001
ENV GID=3000
ENV GROUPS=2000
ENV HOME=/home/${USER}
RUN adduser --disabled-password --gecos "Default user" --uid ${UID} ${USER}

### Install Python with pyenv ###
ARG PYTHON_VER=3.8.3
ENV PYENV_ROOT=${HOME}/.pyenv
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
ENV PATH=$PYENV_ROOT/versions/${PYTHON_VER}/bin:$PATH
RUN mkdir -p ${HOME}/.local/bin && mkdir -p ${HOME}/.local/lib && mkdir -p ~/.pip && git clone https://github.com/pyenv/pyenv.git ${HOME}/.pyenv && apt-get install -y liblzma-dev && pyenv install ${PYTHON_VER} && pyenv global ${PYTHON_VER} && echo "export PYENV_ROOT='$HOME/.pyenv'" >> ~/.bashrc && echo "export PATH='$HOME/.local/bin:$PATH'" >> ~/.bashrc && echo "export PATH='$PYENV_ROOT/bin:$PATH'" >> ~/.bashrc && echo "eval '$(pyenv init - --no-rehash)'" >> ~/.bashrc && echo '[global]\nindex-url=http://ftp.daumkakao.com/pypi/simple\ntrusted-host=ftp.daumkakao.com' >> ~/.pip/pip.conf

### Update python package manger ###
RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel --user
ARG DISABLE_CACHE=None

### ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ ###
# Do not modify the code above.
# We are not responsible for any problems
# that arise when the above code is modified.
# -------------------------------------------
# 상단의 코드를 수정하지 마십시오.
# 상단의 코드를 수정하여 발생하는 문제에 대해서는
# 저희는 책임지지 않습니다.
# ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ #

### 사용자 공간
RUN apt-get update && apt-get install -y libturbojpeg

### ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ ###
# Do not modify the code below.
# We are not responsible for any problems
# that arise when the below code is modified.
# -------------------------------------------
# 하단의 코드를 수정하지 마십시오.
# 하단의 코드를 수정하여 발생하는 문제에 대해서는
# 저희는 책임지지 않습니다.
# ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ #
RUN chown -R ${USER}:${USER} ${HOME}/

### Set Working directory ###
USER ${USER}
WORKDIR ${HOME}
COPY --chown=${USER}:${USER} . ${HOME}/
RUN python3 -m pip install -r requirements.txt --user

16 changes: 16 additions & 0 deletions aigc/docker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
container_name=agc2021
image_name=agc2021
# volume=${CURDIR}
volume=/home/jongkuk/datasets/cocodataset/images/val2017

build-docker:
cd ..;docker build -f docker/Dockerfile -t $(image_name) . --no-cache

run-docker:
docker run -i -t -d --shm-size=8G --init --gpus all -v ${volume}:/home/agc2021/dataset --name $(container_name) $(image_name)

exec-docker:
docker exec -it $(container_name) /bin/bash

rm-docker:
docker stop $(container_name) && docker rm $(container_name)
Loading