ThaiVecFont / Dockerfile
microhum's picture
fix error
9de6eae
raw
history blame contribute delete
861 Bytes
FROM ubuntu:22.04
RUN apt-get -y update && apt-get -y install software-properties-common && apt-get -y install build-essential \
&& add-apt-repository -y ppa:deadsnakes/ppa && apt-get -y install python3.10 && apt-get -y install python3-pip
COPY ./packages.txt /code/packages.txt
RUN xargs apt-get install -y </code/packages.txt
RUN echo $(ls -1 /usr/lib/)
RUN echo $(ls -1 /usr/lib/python3.10)
RUN cp /usr/lib/python3/dist-packages/fontforge.cpython-310-x86_64-linux-gnu.so /usr/lib/python3.10/
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Set home to the user's home directory
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
CMD ["streamlit", "run", "app.py", "--server.port", "7860"]