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

Providing Dockerfile #69

Closed
wants to merge 3 commits into from
Closed
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
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM python:3.12-slim

#https://stackoverflow.com/a/72551258
ENV PIP_ROOT_USER_ACTION=ignore
# This hack is widely applied to avoid python printing issues in docker containers.
# See: https://github.com/Docker-Hub-frolvlad/docker-alpine-python3/pull/13
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV PYTHONUNBUFFERED=1
ENV LANG=C.UTF-8
##https://stackoverflow.com/questions/59732335/is-there-any-disadvantage-in-using-pythondontwritebytecode-in-docker/60797635#60797635
ENV PYTHONDONTWRITEBYTECODE=1

ENV PYTHONPATH=.;$PYTHONPATH

#one can checkout from GIT if desired
COPY . /opt/project/agents-course
WORKDIR /opt/project/agents-course


RUN set -ex && \
#latest pip,setuptools,wheel \
#reason for setuptools==65.6.3 \
#https://stackoverflow.com/questions/76043689/pkg-resources-is-deprecated-as-an-api#comment136784284_76044568 \
python -m pip install --no-cache-dir --upgrade pip==23.1.2 setuptools==65.6.3 \
#python -m piptools compile --no-strip-extras requirements.in \
pip-tools==7.3.0 wheel==0.36.1 && \
python -m pip install --no-cache-dir -r requirements.txt

CMD ["/bin/sh"]
#https://docs.docker.com/reference/build-checks/json-args-recommended/
#CMD tail -f /dev/null
#CMD ["tail", "-f", "/dev/null"]
#SHELL tail -f /dev/null


1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyyaml==6.0.1
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyyaml==6.0.1