- (For docker) rootless/rootful docker
-
Change variables in
./docker/docker-compose.yml
as needed. Especially, you may substitutepytorch-template
in the file with your project name. -
Add scripts into
./docker/rootless/Dockerfile
as needed. It will works without any changes. -
Change variables in
pyproject.toml
as needed. Especially, you may changename
andauthors
in the file. -
To build your Docker image, run the following command in the directory containing the
docker-compose.yml
file:docker compose build
-
Run a docker container via the following command
docker compose up -d
-
Run bash inside of the container
docker compose exec <project_name> /bin/bash
-
Change variables in
pyproject.toml
as needed- e.g., name, version, description, and authors
-
Remove unrequired dependencies in
pyproject.toml
-
Create a vertual environment and install dependencies by
poetry install
-
Add required dependencies by
poetry add <library name>
-
Run the following command to verify that your installation was successful.
poetry run python scripts/installation_verification.py
Note that all changes in the docker container will be deleted when you exit docker container.
To enable GPU calculations, you can override docker-compose.yml
with docker-compose.gpu.yml
by creating ./docker/.env
file as follows:
echo COMPOSE_FILE=docker-compose.yml:docker-compose.gpu.yml >> ./docker/.env
If you're unable to use rootless Docker,
you'll need to override the default settings with docker-compose.rootful.yml
.
Also, you may add scripts into ./docker/rootful/Dockerfile
.
-
Run a docker container
docker compose up -d
-
Run bash inside of the container
docker compose exec <project_name> /bin/bash
-
Run
docker/run_jupyter.sh
./docker/run_jupyter.sh
-
When you write and run your scripts, you need to choose the kernel project_name
- For prototyping, make
notebooks/local
directory and add jupyter notebook into the directory. - For developing, add source files into
src
directory - For testing, add test codes into
test
directory - For evaluation, add script files into
scripts
directory