Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +7 -8
Dockerfile
CHANGED
|
@@ -39,21 +39,20 @@ WORKDIR /app
|
|
| 39 |
# Set password for root user
|
| 40 |
RUN echo "root:137955" | chpasswd
|
| 41 |
|
| 42 |
-
#
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
&& chmod -R 777 $HOME
|
| 46 |
|
| 47 |
# Set up the Conda environment
|
| 48 |
ENV CONDA_AUTO_UPDATE_CONDA=false \
|
| 49 |
-
PATH
|
| 50 |
RUN curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh \
|
| 51 |
&& chmod +x ~/miniconda.sh \
|
| 52 |
&& ~/miniconda.sh -b -p ~/miniconda \
|
| 53 |
&& rm ~/miniconda.sh \
|
| 54 |
&& conda clean -ya
|
| 55 |
|
| 56 |
-
WORKDIR
|
| 57 |
|
| 58 |
# User Debian packages
|
| 59 |
## Security warning: Potential user code executed as root (build time)
|
|
@@ -71,8 +70,8 @@ RUN mkdir /data && chown root:root /data
|
|
| 71 |
RUN --mount=target=requirements.txt,source=requirements.txt \
|
| 72 |
pip install --no-cache-dir --upgrade -r requirements.txt
|
| 73 |
|
| 74 |
-
# Copy the current directory contents into the container at
|
| 75 |
-
COPY --chown=root .
|
| 76 |
|
| 77 |
RUN chmod +x start_server.sh
|
| 78 |
|
|
|
|
| 39 |
# Set password for root user
|
| 40 |
RUN echo "root:137955" | chpasswd
|
| 41 |
|
| 42 |
+
# Ensure the directories exist and set the correct permissions
|
| 43 |
+
RUN mkdir -p /root/.cache /root/.config \
|
| 44 |
+
&& chmod -R 777 /root
|
|
|
|
| 45 |
|
| 46 |
# Set up the Conda environment
|
| 47 |
ENV CONDA_AUTO_UPDATE_CONDA=false \
|
| 48 |
+
PATH=/root/miniconda/bin:$PATH
|
| 49 |
RUN curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh \
|
| 50 |
&& chmod +x ~/miniconda.sh \
|
| 51 |
&& ~/miniconda.sh -b -p ~/miniconda \
|
| 52 |
&& rm ~/miniconda.sh \
|
| 53 |
&& conda clean -ya
|
| 54 |
|
| 55 |
+
WORKDIR /root/app
|
| 56 |
|
| 57 |
# User Debian packages
|
| 58 |
## Security warning: Potential user code executed as root (build time)
|
|
|
|
| 70 |
RUN --mount=target=requirements.txt,source=requirements.txt \
|
| 71 |
pip install --no-cache-dir --upgrade -r requirements.txt
|
| 72 |
|
| 73 |
+
# Copy the current directory contents into the container at /root/app setting the owner to root
|
| 74 |
+
COPY --chown=root . /root/app
|
| 75 |
|
| 76 |
RUN chmod +x start_server.sh
|
| 77 |
|