|
|
|
FROM python:3.10.0-alpine as builder |
|
|
|
|
|
RUN adduser -D admin |
|
|
|
|
|
WORKDIR /srv |
|
RUN chown -R admin:admin /srv && \ |
|
chmod -R 755 /srv |
|
|
|
|
|
RUN apk --no-cache add \ |
|
libu2f-dev \ |
|
vulkan-tools \ |
|
mesa-vulkan-radeon \ |
|
wget \ |
|
ffmpeg \ |
|
curl \ |
|
aria2 \ |
|
ttf-liberation \ |
|
at-spi2-atk \ |
|
atk \ |
|
cups-libs \ |
|
libdrm \ |
|
libgbm \ |
|
gtk3 \ |
|
nspr \ |
|
nss \ |
|
libu2f-host \ |
|
vulkan-loader \ |
|
libxcomposite \ |
|
libxdamage \ |
|
libxfixes \ |
|
alsa-lib \ |
|
libxkbcommon \ |
|
libxrandr \ |
|
xdg-utils \ |
|
npm |
|
|
|
|
|
COPY --chown=admin . /srv |
|
|
|
|
|
RUN npm install npm@latest -g && \ |
|
npm install n -g && \ |
|
n latest |
|
|
|
|
|
RUN echo "Node.js version: $(node -v)" && \ |
|
echo "npm version: $(npm -v)" |
|
|
|
|
|
|
|
|
|
COPY requirements.txt . |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
CMD ["bash", "-c", "python -m uvicorn App.app:app --host 0.0.0.0 --port 7860 & python -m celery -A App.Worker.celery worker -c 4 --loglevel=info"] |
|
|
|
|
|
EXPOSE 7860 |
|
|