<commit_before># docker-gthnk
# <NAME>

FROM iandennismiller/python:latest

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

# Add application user
RUN adduser \
  --home "/home/gthnk" \
  --uid 1000 \
  --gecos "gthnk" \
  --disabled-password \
  "gthnk"

# Copy home directory structure
RUN mkdir -p /home/gthnk/.gthnk

# Install Gthnk Requirements
COPY requirements.txt /home/gthnk/gthnk/
RUN sudo -i -u gthnk pip3 install --user -r /home/gthnk/gthnk/requirements.txt
RUN chown -R gthnk:gthnk /home/gthnk

COPY src/docker/bin/ /home/gthnk/.local/bin
COPY bin/ /home/gthnk/gthnk/bin
COPY src/ /home/gthnk/gthnk/src
COPY setup.py /home/gthnk/gthnk/
COPY Readme.rst /home/gthnk/gthnk/
RUN chown -R gthnk:gthnk /home/gthnk/.local/bin /home/gthnk/gthnk

# Install Gthnk
RUN sudo -i -u gthnk pip3 install --user /home/gthnk/gthnk

# 1) Generate configuration if necessary
# 2) Launch the Gthnk server
CMD if [ ! -f /home/gthnk/.gthnk/gthnk.conf ]; then \
  sudo -i -u gthnk gthnk-firstrun.sh /home/gthnk/.gthnk/gthnk.conf; \
  fi; \
  sudo -i -u gthnk gthnk-server.sh<commit_msg>streamline docker build for less churn<commit_after># docker-gthnk
# <NAME>

FROM iandennismiller/python:latest

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

# Add application user
RUN adduser \
  --home "/home/gthnk" \
  --uid 1000 \
  --gecos "gthnk" \
  --disabled-password \
  "g<PASSWORD>"

# Copy home directory structure
RUN mkdir -p /home/gthnk/.gthnk

# Install Gthnk Requirements
COPY requirements.txt /home/gthnk/gthnk/
RUN sudo -i -u gthnk pip3 install --user -r /home/gthnk/gthnk/requirements.txt

COPY src/docker/bin/ /home/gthnk/.local/bin
RUN chown -R gthnk:gthnk /home/gthnk/.local/bin

COPY bin/ /home/gthnk/gthnk/bin
COPY src/ /home/gthnk/gthnk/src
COPY setup.py /home/gthnk/gthnk/
COPY Readme.rst /home/gthnk/gthnk/

# Install Gthnk
RUN sudo -i -u gthnk pip3 install --user /home/gthnk/gthnk

# 1) Generate configuration if necessary
# 2) Launch the Gthnk server
CMD if [ ! -f /home/gthnk/.gthnk/gthnk.conf ]; then \
  sudo -i -u gthnk gthnk-firstrun.sh /home/gthnk/.gthnk/gthnk.conf; \
  fi; \
  sudo -i -u gthnk gthnk-server.sh
{'fraction_non_alphanumeric': 0.13539192399049882, 'fraction_numerical': 0.009501187648456057, 'mean_word_length': 3.026768642447419, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5118568', 'n_tokens_mistral': 1024, 'n_tokens_neox': 895, 'n_words': 218}