Files
SkyratBot 2fd815f46e [MIRROR] Adds -y to upgrade in the docker files to prevent breakage (#27712)
* Adds -y to upgrade in the docker files to prevent breakage (#83198)

## About The Pull Request

Adds -y to upgrade in the docker files to prevent breakage
## Why It's Good For The Game

Prevents:

![image](https://github.com/tgstation/tgstation/assets/17237624/f5678b77-6e3a-4b83-9b95-18d51fd07573)

## Changelog
🆑
fix: Fixes error when running docker compose on apt upgrade
/🆑

* Adds -y to upgrade in the docker files to prevent breakage

---------

Co-authored-by: Dax Dupont <skyemenjou@gmail.com>
2024-05-16 06:30:27 +02:00

43 lines
1.6 KiB
Docker

# Grab debian-bullseye-slim
FROM debian:bullseye-slim
# install required packages
RUN apt-get update && apt-get upgrade -y && apt-get install -y ffmpeg wget curl &&\
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install Anaconda
ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py310_22.11.1-1-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda
# Put conda in path so we can use conda
ENV PATH=$CONDA_DIR/bin:$PATH
# Enable intel packages
RUN conda config --add channels intel
# Setup intel enhanced python environment named 'intel'.
RUN conda create -n intel intelpython3_full python=3.9 numba=0.55.1 && conda clean --index-cache --tarballs --packages
# Use the intel enhanced python environment from now on.
SHELL ["conda", "run", "-n", "intel", "/bin/bash", "-c"]
# Setup python requirements and install the TTS python module into the new intel anaconda environment.
RUN pip install Flask &&\
pip install waitress &&\
pip install pysbd &&\
pip install pydub &&\
pip cache purge
COPY . /root
RUN mkdir /tts_files
WORKDIR /root
# fix: `libstdc++.so.6: version `GLIBCXX_3.4.29' not found`
# tl;dr is we need to have /opt/conda/lib in the library path for python, but *not things ran by python*
# the python script will look for TTS_LD_LIBRARY_PATH and use it for things it runs.
RUN conda env config vars set TTS_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
RUN conda env config vars set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_DIR/lib
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "intel", "python", "tts-api.py"]