Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change base image of dockerfiles #63

Merged
merged 1 commit into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM mcr.microsoft.com/playwright
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11
FROM ubuntu:22.04

# Prevent dialog prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive

# set work directory
WORKDIR /app
Expand All @@ -8,6 +10,21 @@ WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# Install system tools, Python, FastAPI essentials, and Playwright's dependencies
RUN apt-get update && apt-get install -y \
wget \
python3.11 \
python3-pip \
python3-venv \
libgtk-3-0 \
libdbus-glib-1-2 \
libnss3 \
libxss1 \
libasound2 \
ffmpeg \
gunicorn \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# copy project
COPY api ./api
COPY config ./config
Expand All @@ -20,13 +37,10 @@ COPY index ./index
COPY setup.py .
COPY requirements.txt .

# install dependencies
# install pyhton dependencies
RUN pip install -r requirements.txt

# install playwright and dependencies
RUN python setup.py install
RUN playwright install
RUN playwright install-deps

# install ffmpeg
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get install -y ffmpeg
30 changes: 22 additions & 8 deletions worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM mcr.microsoft.com/playwright
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11
FROM ubuntu:22.04

# Prevent dialog prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive

# set work directory
WORKDIR /app
Expand All @@ -8,6 +10,21 @@ WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# Install system tools, Python, FastAPI essentials, and Playwright's dependencies
RUN apt-get update && apt-get install -y \
wget \
python3.11 \
python3-pip \
python3-venv \
libgtk-3-0 \
libdbus-glib-1-2 \
libnss3 \
libxss1 \
libasound2 \
ffmpeg \
gunicorn \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# copy project
COPY api ./api
COPY config ./config
Expand All @@ -20,13 +37,10 @@ COPY index ./index
COPY setup.py .
COPY requirements.txt .

# install dependencies
# install pyhton dependencies
RUN pip install -r requirements.txt

# install playwright and dependencies
RUN python setup.py install
RUN playwright install
RUN playwright install-deps

# install ffmpeg
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get install -y ffmpeg
30 changes: 22 additions & 8 deletions worker/Dockerfile.gpu_accelerated
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM mcr.microsoft.com/playwright
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11
FROM ubuntu:22.04

# Prevent dialog prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive

# set work directory
WORKDIR /app
Expand All @@ -8,6 +10,21 @@ WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# Install system tools, Python, FastAPI essentials, and Playwright's dependencies
RUN apt-get update && apt-get install -y \
wget \
python3.11 \
python3-pip \
python3-venv \
libgtk-3-0 \
libdbus-glib-1-2 \
libnss3 \
libxss1 \
libasound2 \
ffmpeg \
gunicorn \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# copy project
COPY api ./api
COPY config ./config
Expand All @@ -20,17 +37,14 @@ COPY index ./index
COPY setup.py .
COPY requirements.txt .

# install dependencies
# install pyhton dependencies
RUN pip install -r requirements.txt

# install playwright and dependencies
RUN python setup.py install
RUN playwright install
RUN playwright install-deps

# install ffmpeg
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get install -y ffmpeg

# Install GPU drivers
RUN pip uninstall torch -y
RUN pip cache purge
Expand Down