|
|
|
FROM python:3.10.0 as builder |
|
|
|
RUN useradd -ms /bin/bash admin |
|
|
|
WORKDIR /srv |
|
RUN chown -R admin:admin /srv |
|
RUN chmod 755 /srv |
|
|
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y --no-install-recommends \ |
|
aria2 ffmpeg libgl1-mesa-dev \ |
|
libgles2-mesa-dev \ |
|
libglu1-mesa-dev \ |
|
build-essential \ |
|
cmake \ |
|
freeglut3-dev \ |
|
libglfw3-dev \ |
|
libglew-dev \ |
|
libsdl2-dev \ |
|
libjpeg-dev \ |
|
libpng-dev \ |
|
libfreetype6-dev \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
COPY requirements.txt . |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
RUN apt-get update && apt-get install -y \ |
|
tesseract-ocr \ |
|
libtesseract-dev |
|
RUN pip install pytesseract |
|
|
|
|
|
USER admin |
|
|
|
|
|
|
|
COPY --chown=admin . /srv |
|
USER root |
|
RUN chown -R admin:admin /srv |
|
|
|
ADD https://github.com/porjo/youtubeuploader/releases/download/v1.24.4/youtubeuploader_1.24.4_Linux_amd64.tar.gz youtubeuploader.tar.gz |
|
RUN mkdir -p /srv/youtube && \ |
|
tar -zxvf youtubeuploader.tar.gz -C /srv/youtube && \ |
|
rm youtubeuploader.tar.gz && \ |
|
chmod +x /srv/youtube/youtubeuploader |
|
|
|
|
|
CMD uvicorn App.app:app --host 0.0.0.0 --port 7860 --workers 1 |
|
|
|
EXPOSE 7860 |