checkrawdashboard / Dockerfile
Arts-of-coding's picture
Update Dockerfile
416a0e7 verified
raw
history blame
No virus
1.74 kB
# Use an official Python runtime as a base image
FROM ubuntu:18.04
FROM python:3.9-slim
# Expose the port to run it
ENV LISTEN_PORT=5000
EXPOSE 5000
LABEL Maintainer="arts-of-coding"
RUN useradd -m -u 1000 user
WORKDIR /
# fix locales
RUN apt-get update \
&& apt-get install -y --no-install-recommends locales \
&& rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8
# install blobfuse
RUN apt-get update \
&& apt-get install -y wget apt-utils \
&& wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& apt-get remove -y wget \
&& apt-get update \
&& apt-get install -y --no-install-recommends fuse blobfuse libcurl3-gnutls libgnutls30 \
&& rm -rf /var/lib/apt/lists/*
COPY --chown=user mount-blobfuse.sh /
RUN chmod +x /mount-blobfuse.sh
#COPY --from=compiler /opt/venv/bin/activate /usr/local/bin/activate_venv
COPY --chown=user /app/mount-blobfuse.sh /app/mount-blobfuse.sh
#ADD /data/ /app/data/
WORKDIR /app
# Preset the volume change this to the actual azure folder
#VOLUME /dash_plotly_QC_scRNA/./data
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
COPY --chown=user ./requirements.txt ./
COPY --chown=user ./dash_plotly_QC_scRNA.py ./
COPY --chown=user ./main.py ./
ADD --chown=user ./azure
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# How the docker app will run
ENTRYPOINT ["/bin/bash", "-c", "/mount-blobfuse.sh; exec $SHELL"]
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"]