Update Dockerfile
Browse files- Dockerfile +57 -54
Dockerfile
CHANGED
|
@@ -1,55 +1,58 @@
|
|
| 1 |
-
# Use an official Python runtime as a base image
|
| 2 |
-
FROM ubuntu:18.04
|
| 3 |
-
FROM python:3.9-slim
|
| 4 |
-
|
| 5 |
-
# Expose the port to run it
|
| 6 |
-
ENV LISTEN_PORT=5000
|
| 7 |
-
EXPOSE 5000
|
| 8 |
-
|
| 9 |
-
LABEL Maintainer="arts-of-coding"
|
| 10 |
-
|
| 11 |
-
WORKDIR /
|
| 12 |
-
|
| 13 |
-
# fix locales
|
| 14 |
-
RUN apt-get update \
|
| 15 |
-
&& apt-get install -y --no-install-recommends locales \
|
| 16 |
-
&& rm -rf /var/lib/apt/lists/* \
|
| 17 |
-
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
| 18 |
-
|
| 19 |
-
ENV LANG en_US.utf8
|
| 20 |
-
|
| 21 |
-
# install blobfuse
|
| 22 |
-
RUN apt-get update \
|
| 23 |
-
&& apt-get install -y wget apt-utils \
|
| 24 |
-
&& wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \
|
| 25 |
-
&& dpkg -i packages-microsoft-prod.deb \
|
| 26 |
-
&& apt-get remove -y wget \
|
| 27 |
-
&& apt-get update \
|
| 28 |
-
&& apt-get install -y --no-install-recommends fuse blobfuse libcurl3-gnutls libgnutls30 \
|
| 29 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 30 |
-
|
| 31 |
-
COPY mount-blobfuse.sh /
|
| 32 |
-
RUN chmod +x /mount-blobfuse.sh
|
| 33 |
-
#COPY --from=compiler /opt/venv/bin/activate /usr/local/bin/activate_venv
|
| 34 |
-
COPY /mount-blobfuse.sh /app/mount-blobfuse.sh
|
| 35 |
-
|
| 36 |
-
#ADD /data/ /app/data/
|
| 37 |
-
|
| 38 |
-
#WORKDIR /app/
|
| 39 |
-
|
| 40 |
-
# Preset the volume change this to the actual azure folder
|
| 41 |
-
#VOLUME /dash_plotly_QC_scRNA/./data
|
| 42 |
-
|
| 43 |
-
WORKDIR /
|
| 44 |
-
|
| 45 |
-
COPY ./requirements.txt ./
|
| 46 |
-
RUN pip install --requirement ./requirements.txt
|
| 47 |
-
|
| 48 |
-
COPY ./dash_plotly_QC_scRNA.py ./
|
| 49 |
-
|
| 50 |
-
COPY ./main.py ./
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
| 55 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"]
|
|
|
|
| 1 |
+
# Use an official Python runtime as a base image
|
| 2 |
+
FROM ubuntu:18.04
|
| 3 |
+
FROM python:3.9-slim
|
| 4 |
+
|
| 5 |
+
# Expose the port to run it
|
| 6 |
+
ENV LISTEN_PORT=5000
|
| 7 |
+
EXPOSE 5000
|
| 8 |
+
|
| 9 |
+
LABEL Maintainer="arts-of-coding"
|
| 10 |
+
|
| 11 |
+
WORKDIR /
|
| 12 |
+
|
| 13 |
+
# fix locales
|
| 14 |
+
RUN apt-get update \
|
| 15 |
+
&& apt-get install -y --no-install-recommends locales \
|
| 16 |
+
&& rm -rf /var/lib/apt/lists/* \
|
| 17 |
+
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
| 18 |
+
|
| 19 |
+
ENV LANG en_US.utf8
|
| 20 |
+
|
| 21 |
+
# install blobfuse
|
| 22 |
+
RUN apt-get update \
|
| 23 |
+
&& apt-get install -y wget apt-utils \
|
| 24 |
+
&& wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \
|
| 25 |
+
&& dpkg -i packages-microsoft-prod.deb \
|
| 26 |
+
&& apt-get remove -y wget \
|
| 27 |
+
&& apt-get update \
|
| 28 |
+
&& apt-get install -y --no-install-recommends fuse blobfuse libcurl3-gnutls libgnutls30 \
|
| 29 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 30 |
+
|
| 31 |
+
COPY mount-blobfuse.sh /
|
| 32 |
+
RUN chmod +x /mount-blobfuse.sh
|
| 33 |
+
#COPY --from=compiler /opt/venv/bin/activate /usr/local/bin/activate_venv
|
| 34 |
+
COPY /mount-blobfuse.sh /app/mount-blobfuse.sh
|
| 35 |
+
|
| 36 |
+
#ADD /data/ /app/data/
|
| 37 |
+
|
| 38 |
+
#WORKDIR /app/
|
| 39 |
+
|
| 40 |
+
# Preset the volume change this to the actual azure folder
|
| 41 |
+
#VOLUME /dash_plotly_QC_scRNA/./data
|
| 42 |
+
|
| 43 |
+
WORKDIR /
|
| 44 |
+
|
| 45 |
+
COPY ./requirements.txt ./
|
| 46 |
+
RUN pip install --requirement ./requirements.txt
|
| 47 |
+
|
| 48 |
+
COPY ./dash_plotly_QC_scRNA.py ./
|
| 49 |
+
|
| 50 |
+
COPY ./main.py ./
|
| 51 |
+
|
| 52 |
+
RUN mkdir -p /app/azure
|
| 53 |
+
RUN chmod 777 /app/azure
|
| 54 |
+
|
| 55 |
+
# How the docker app will run
|
| 56 |
+
ENTRYPOINT ["/bin/bash", "-c", "/mount-blobfuse.sh; exec $SHELL"]
|
| 57 |
+
|
| 58 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"]
|