Skip to content

Commit

Permalink
set locale within Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pdiakumis committed Jun 19, 2024
1 parent a03d3bd commit e0167ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ FROM quay.io/bioconda/base-glibc-busybox-bash:3.1

COPY --from=0 /opt/mambaforge/envs/ /opt/mambaforge/envs/

ENV LANGUAGE='C.UTF-8'
ENV LANG='C.UTF-8'
ENV LC_ALL='C.UTF-8'

ARG PCGR_ENV_NAME="pcgr"
# pcgr env is activated by default
ENV PATH="/opt/mambaforge/envs/${PCGR_ENV_NAME}/bin:${PATH}"
Expand Down
8 changes: 4 additions & 4 deletions pcgr/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ def cli():
optional_other.add_argument("--pcgrr_conda", default="pcgrr", help="pcgrr conda env name (default: %(default)s)")

# Set locale since apptainer on HPC gives warnings
locale_to_use = utils.get_locale()
os.environ["LC_ALL"] = locale_to_use
os.environ["LC"] = locale_to_use
os.environ["LANG"] = locale_to_use
#locale_to_use = utils.get_locale()
#os.environ["LANGUAGE"] = locale_to_use
#os.environ["LANG"] = locale_to_use
#os.environ["LC_ALL"] = locale_to_use

# Parse required and optional arguments
args = parser.parse_args()
Expand Down

0 comments on commit e0167ee

Please sign in to comment.