Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -4
Dockerfile
CHANGED
|
@@ -27,13 +27,22 @@ RUN rm -f /etc/apt/sources.list.d/*.list && \
|
|
| 27 |
&& rm -rf /var/lib/apt/lists/*
|
| 28 |
|
| 29 |
RUN add-apt-repository ppa:flexiondotorg/nvtop && \
|
|
|
|
| 30 |
apt-get upgrade -y && \
|
| 31 |
apt-get install -y --no-install-recommends nvtop
|
| 32 |
|
| 33 |
-
|
|
|
|
| 34 |
apt-get install -y nodejs && \
|
| 35 |
npm install -g configurable-http-proxy
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
# Create a working directory
|
| 38 |
WORKDIR /app
|
| 39 |
|
|
@@ -51,6 +60,7 @@ RUN mkdir $HOME/.cache $HOME/.config \
|
|
| 51 |
# Set up the Conda environment
|
| 52 |
ENV CONDA_AUTO_UPDATE_CONDA=false \
|
| 53 |
PATH=$HOME/miniconda/bin:$PATH
|
|
|
|
| 54 |
RUN curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh \
|
| 55 |
&& chmod +x ~/miniconda.sh \
|
| 56 |
&& ~/miniconda.sh -b -p ~/miniconda \
|
|
@@ -66,7 +76,6 @@ WORKDIR $HOME/app
|
|
| 66 |
USER root
|
| 67 |
|
| 68 |
# User Debian packages
|
| 69 |
-
## Security warning : Potential user code executed as root (build time)
|
| 70 |
RUN --mount=target=/root/packages.txt,source=packages.txt \
|
| 71 |
apt-get update && \
|
| 72 |
xargs -r -a /root/packages.txt apt-get install -y --no-install-recommends \
|
|
@@ -87,7 +96,7 @@ USER user
|
|
| 87 |
RUN --mount=target=requirements.txt,source=requirements.txt \
|
| 88 |
pip install --no-cache-dir --upgrade -r requirements.txt
|
| 89 |
|
| 90 |
-
# Copy the current directory contents into the container
|
| 91 |
COPY --chown=user . $HOME/app
|
| 92 |
|
| 93 |
RUN chmod +x start_server.sh
|
|
@@ -102,4 +111,4 @@ ENV PYTHONUNBUFFERED=1 \
|
|
| 102 |
SYSTEM=spaces \
|
| 103 |
SHELL=/bin/bash
|
| 104 |
|
| 105 |
-
CMD ["./start_server.sh"]
|
|
|
|
| 27 |
&& rm -rf /var/lib/apt/lists/*
|
| 28 |
|
| 29 |
RUN add-apt-repository ppa:flexiondotorg/nvtop && \
|
| 30 |
+
apt-get update && \
|
| 31 |
apt-get upgrade -y && \
|
| 32 |
apt-get install -y --no-install-recommends nvtop
|
| 33 |
|
| 34 |
+
# Install Node.js
|
| 35 |
+
RUN curl -sL https://deb.nodesource.com/setup_21.x | bash - && \
|
| 36 |
apt-get install -y nodejs && \
|
| 37 |
npm install -g configurable-http-proxy
|
| 38 |
|
| 39 |
+
# Install Golang
|
| 40 |
+
RUN add-apt-repository ppa:longsleep/golang-backports && \
|
| 41 |
+
apt-get update && \
|
| 42 |
+
apt-get install -y golang-go
|
| 43 |
+
|
| 44 |
+
ENV PATH="/usr/lib/go/bin:${PATH}"
|
| 45 |
+
|
| 46 |
# Create a working directory
|
| 47 |
WORKDIR /app
|
| 48 |
|
|
|
|
| 60 |
# Set up the Conda environment
|
| 61 |
ENV CONDA_AUTO_UPDATE_CONDA=false \
|
| 62 |
PATH=$HOME/miniconda/bin:$PATH
|
| 63 |
+
|
| 64 |
RUN curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh \
|
| 65 |
&& chmod +x ~/miniconda.sh \
|
| 66 |
&& ~/miniconda.sh -b -p ~/miniconda \
|
|
|
|
| 76 |
USER root
|
| 77 |
|
| 78 |
# User Debian packages
|
|
|
|
| 79 |
RUN --mount=target=/root/packages.txt,source=packages.txt \
|
| 80 |
apt-get update && \
|
| 81 |
xargs -r -a /root/packages.txt apt-get install -y --no-install-recommends \
|
|
|
|
| 96 |
RUN --mount=target=requirements.txt,source=requirements.txt \
|
| 97 |
pip install --no-cache-dir --upgrade -r requirements.txt
|
| 98 |
|
| 99 |
+
# Copy the current directory contents into the container
|
| 100 |
COPY --chown=user . $HOME/app
|
| 101 |
|
| 102 |
RUN chmod +x start_server.sh
|
|
|
|
| 111 |
SYSTEM=spaces \
|
| 112 |
SHELL=/bin/bash
|
| 113 |
|
| 114 |
+
CMD ["./start_server.sh"]
|