download dataset

๋„ˆ๋ฌด ๋ฉ€๋ฆฌ ๊ฐ€๋Š”์ค‘์ธ๋“ฏ..์–ด๋–ปํ•˜์ง€?

kaggle ์‚ฌ์šฉํ•˜๊ธฐ

์ผ๋‹จ ๊ฐ€์ž…ํ•œ๋‹ค. https://www.kaggle.com/

kaggle api key ๋ฐœ๊ธ‰

Alt text
Alt text

setting >> api >> create new api token

Alt text

kaggle.json์ด ๋‹ค์šด๋กœ๋“œ ๋œ๋‹ค.,

Alt text

์ด์ œ kaggle.json์„ ~/.kaggle/๋กœ ์˜ฎ๊ธด๋‹ค.

mkdir ~/.kaggle
mv ~/Downloads/kaggle.json ~/.kaggle/
chmod 600 ~/.kaggle/kaggle.json

kaggle cli ์„ค์น˜

pip install kaggle

model download

์›ํ•˜๋Š” ๋ชจ๋ธํŽ˜์ด์ง€์— ๊ฐ€์„œ download๋ฅผ ๋ˆ„๋ฅด์ž.

https://www.kaggle.com/c/dogs-vs-cats-redux-kernels-edition

Alt text

data ํƒญ์„ ๋ˆ„๋ฅด์ž.

์—ฌ๊ธฐ์—์„œ ๋‹ค์Œ๋ถ€๋ถ„์„ ๋ณต์‚ฌํ•œ๋‹ค.

Alt text
kaggle competitions download -c dogs-vs-cats-redux-kernels-edition

docker๋กœ kaggle cli ์‹คํ–‰

FROM python:3.10-bullseye

WORKDIR /code

COPY ./requirements.txt ./

RUN pip install --upgrade pip

RUN pip install -r requirements.txt

WORKDIR /code/src

CMD [ "python", "app.py" ]
# docker-compose.yml
version: '3.10'
services:
  python:
    build: .
    container_name: python
    volumes:
      - ./src:/code/src
      - ./.kaggle:/root/.kaggle
    command: ["sleep", "infinity"]

requirements.txt

tensorflow
pandas
matplotlib
kaggle

.kaggle ํด๋”์— kaggle.json์ด ์žˆ์–ด์•ผ ํ•œ๋‹ค.

docker-compose up -d --build
docker exec -it python sh

kaggle competitions list -h
kaggle competitions download -h

kaggle competitions download -c dogs-vs-cats-redux-kernels-edition

Last updated

Was this helpful?