|
|
|
FROM python:3.10.0 as builder |
|
|
|
RUN useradd -ms /bin/bash admin |
|
|
|
WORKDIR /srv |
|
RUN chown -R admin:admin /srv |
|
RUN chmod -R 755 /srv |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y libu2f-udev libvulkan1 mesa-vulkan-drivers wget |
|
|
|
|
|
RUN curl -LO https://github.com/Alex313031/thorium/releases/download/M117.0.5938.157/thorium-browser_117.0.5938.157_amd64.deb && \ |
|
dpkg -i thorium-browser_117.0.5938.157_amd64.deb |
|
|
|
|
|
RUN apt-get install -y nodejs npm |
|
|
|
USER admin |
|
|
|
|
|
COPY --chown=admin . /srv |
|
|
|
|
|
COPY requirements.txt . |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
COPY package*.json ./ |
|
RUN npm install |
|
|
|
|
|
CMD uvicorn App.app:app --host 0.0.0.0 --port 7860 --workers 4 & celery -A App.Worker.celery worker -c 4 --loglevel=DEBUG |
|
|