Commit
·
e4a50e0
1
Parent(s):
59abdda
update
Browse files- Dockerfile +9 -10
Dockerfile
CHANGED
|
@@ -3,12 +3,9 @@ FROM python:3.8
|
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR $HOME/app
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
RUN
|
| 9 |
-
USER user
|
| 10 |
-
ENV HOME /home/user
|
| 11 |
-
ENV PATH $HOME/.local/bin:$PATH
|
| 12 |
|
| 13 |
# Install system dependencies
|
| 14 |
RUN apt-get update && apt-get install -y \
|
|
@@ -29,8 +26,14 @@ RUN apt-get update && apt-get install -y \
|
|
| 29 |
libgomp1 \
|
| 30 |
&& rm -rf /var/lib/apt/lists/* \
|
| 31 |
&& apt-get clean
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
WORKDIR $HOME/app
|
|
|
|
| 34 |
# Create .streamlit/config.toml file
|
| 35 |
RUN mkdir -p /app/.streamlit && \
|
| 36 |
echo "[server]\nenableXsrfProtection = false\nenableCORS = false" > /app/.streamlit/config.toml
|
|
@@ -44,10 +47,6 @@ COPY --chown=user . $HOME/app/text-remove
|
|
| 44 |
RUN mkdir -p $HOME/app/text-remove/.streamlit && \
|
| 45 |
echo "[server]\nenableXsrfProtection = false\nenableCORS = false" > $HOME/app/text-remove/.streamlit/config.toml
|
| 46 |
|
| 47 |
-
# Install Python dependencies
|
| 48 |
-
COPY requirements.txt .
|
| 49 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 50 |
-
|
| 51 |
# Set up Craft
|
| 52 |
WORKDIR $HOME/app/text-remove/CRAFT-pytorch
|
| 53 |
COPY --chown=user . $HOME/app/text-remove/CRAFT-pytorch
|
|
|
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR $HOME/app
|
| 6 |
+
# Install Python dependencies
|
| 7 |
+
COPY ./requirements.txt /app/requirements.txt
|
| 8 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Install system dependencies
|
| 11 |
RUN apt-get update && apt-get install -y \
|
|
|
|
| 26 |
libgomp1 \
|
| 27 |
&& rm -rf /var/lib/apt/lists/* \
|
| 28 |
&& apt-get clean
|
| 29 |
+
|
| 30 |
+
RUN useradd -m -u 1000 user
|
| 31 |
+
USER user
|
| 32 |
+
ENV HOME /home/user
|
| 33 |
+
ENV PATH $HOME/.local/bin:$PATH
|
| 34 |
|
| 35 |
WORKDIR $HOME/app
|
| 36 |
+
COPY --chown=user . $HOME/app
|
| 37 |
# Create .streamlit/config.toml file
|
| 38 |
RUN mkdir -p /app/.streamlit && \
|
| 39 |
echo "[server]\nenableXsrfProtection = false\nenableCORS = false" > /app/.streamlit/config.toml
|
|
|
|
| 47 |
RUN mkdir -p $HOME/app/text-remove/.streamlit && \
|
| 48 |
echo "[server]\nenableXsrfProtection = false\nenableCORS = false" > $HOME/app/text-remove/.streamlit/config.toml
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
# Set up Craft
|
| 51 |
WORKDIR $HOME/app/text-remove/CRAFT-pytorch
|
| 52 |
COPY --chown=user . $HOME/app/text-remove/CRAFT-pytorch
|