-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update jinja templates, add versions to cookiecutter.json as hi…
…dden variables
- Loading branch information
1 parent
6645ba8
commit 3e671c6
Showing
14 changed files
with
328 additions
and
204 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
FROM python:{{ cookiecutter.python_version }}-slim-bookworm | ||
{{'\n# Install poetry\nRUN pip install "poetry==1.8.2"\n' if cookiecutter.dependency_manager != 'pip'}} | ||
|
||
{%- if cookiecutter.dependency_manager != 'pip' %} | ||
|
||
# Install Poetry | ||
RUN pip install "poetry=={{ cookiecutter._poetry_version }}" | ||
{%- endif %} | ||
|
||
# Move the files into the container | ||
WORKDIR /project | ||
COPY . /project | ||
|
||
# Install dependencies | ||
{{'RUN poetry env use python' if cookiecutter.dependency_manager != 'pip'}}{{cookiecutter.python_version if cookiecutter.dependency_manager != 'pip'}}{{'\nRUN poetry install --no-interaction --no-cache --without dev' if cookiecutter.dependency_manager != 'pip' else 'RUN pip install .'}} | ||
{% if cookiecutter.dependency_manager != 'pip' -%} | ||
RUN poetry env use python {{ cookiecutter.python_version }} | ||
RUN poetry install --no-interaction --no-cache --without dev | ||
{%- else -%} | ||
RUN python3 -m venv .venv | ||
RUN . .venv/bin/activate && pip install . | ||
{%- endif %} | ||
|
||
# Run the script | ||
CMD {{'poetry run ' if cookiecutter.dependency_manager != 'pip'}}python src/scripts/your_script.py | ||
{% if cookiecutter.dependency_manager != 'pip' -%} | ||
CMD poetry run python src/scripts/main.py | ||
{%- else -%} | ||
CMD . .venv/bin/activate && python src/scripts/main.py | ||
{%- endif %} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
"""Config files to be used with hydra.""" | ||
"""Config files to be used with Hydra.""" |
Oops, something went wrong.