Commit
·
20f05ab
1
Parent(s):
35a62a4
update
Browse files- Dockerfile +11 -11
Dockerfile
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
FROM python:3.8
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
-
WORKDIR
|
| 6 |
ENV HYDRA_FULL_ERROR="1"
|
| 7 |
# Install Python dependencies
|
| 8 |
COPY ./requirements.txt /app/requirements.txt
|
|
@@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y \
|
|
| 28 |
&& rm -rf /var/lib/apt/lists/* \
|
| 29 |
&& apt-get clean
|
| 30 |
|
| 31 |
-
WORKDIR
|
| 32 |
#COPY --chown=user . $HOME/app
|
| 33 |
# Create .streamlit/config.toml file
|
| 34 |
RUN mkdir -p /app/.streamlit && \
|
|
@@ -40,26 +40,26 @@ WORKDIR /app/text-remove
|
|
| 40 |
RUN git clone https://github.com/nguyen-brat/text-remove.git .
|
| 41 |
|
| 42 |
# Set the working directory to the cloned repo
|
| 43 |
-
WORKDIR
|
| 44 |
#COPY --chown=user . $HOME/app/text-remove
|
| 45 |
-
RUN mkdir -p
|
| 46 |
-
echo "[server]\nenableXsrfProtection = false\nenableCORS = false" >
|
| 47 |
|
| 48 |
# Set up Craft
|
| 49 |
-
WORKDIR
|
| 50 |
#COPY --chown=user . $HOME/app/text-remove/CRAFT-pytorch
|
| 51 |
RUN wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1Jk4eGD7crsqCCg9C9VjCLkMN3ze8kutZ' -O "craft_mlt_25k.pth"
|
| 52 |
RUN pip install gdown
|
| 53 |
RUN gdown 1XSaFwBkOaFOdtk4Ane3DFyJGPRw6v5bO
|
| 54 |
|
| 55 |
# Set up lama
|
| 56 |
-
WORKDIR
|
| 57 |
#COPY --chown=user . $HOME/app/text-remove/lama
|
| 58 |
RUN curl -LJO https://huggingface.co/smartywu/big-lama/resolve/main/big-lama.zip
|
| 59 |
RUN unzip big-lama.zip
|
| 60 |
|
| 61 |
-
#RUN chmod 777
|
| 62 |
-
#RUN chmod 777
|
| 63 |
|
| 64 |
# RUN useradd -m -u 1000 user
|
| 65 |
# USER user
|
|
@@ -67,12 +67,12 @@ RUN unzip big-lama.zip
|
|
| 67 |
# ENV PATH $HOME/.local/bin:$PATH
|
| 68 |
|
| 69 |
# Set the working directory back to the root of the project
|
| 70 |
-
WORKDIR
|
| 71 |
|
| 72 |
# Make port 7860 available to the world outside this container
|
| 73 |
EXPOSE 7860
|
| 74 |
|
| 75 |
-
ENV PYTHONPATH
|
| 76 |
|
| 77 |
# Run app.py when the container launches
|
| 78 |
ENTRYPOINT ["streamlit", "run"]
|
|
|
|
| 2 |
FROM python:3.8
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
ENV HYDRA_FULL_ERROR="1"
|
| 7 |
# Install Python dependencies
|
| 8 |
COPY ./requirements.txt /app/requirements.txt
|
|
|
|
| 28 |
&& rm -rf /var/lib/apt/lists/* \
|
| 29 |
&& apt-get clean
|
| 30 |
|
| 31 |
+
WORKDIR /app
|
| 32 |
#COPY --chown=user . $HOME/app
|
| 33 |
# Create .streamlit/config.toml file
|
| 34 |
RUN mkdir -p /app/.streamlit && \
|
|
|
|
| 40 |
RUN git clone https://github.com/nguyen-brat/text-remove.git .
|
| 41 |
|
| 42 |
# Set the working directory to the cloned repo
|
| 43 |
+
WORKDIR /app/text-remove
|
| 44 |
#COPY --chown=user . $HOME/app/text-remove
|
| 45 |
+
RUN mkdir -p /app/text-remove/.streamlit && \
|
| 46 |
+
echo "[server]\nenableXsrfProtection = false\nenableCORS = false" > /app/text-remove/.streamlit/config.toml
|
| 47 |
|
| 48 |
# Set up Craft
|
| 49 |
+
WORKDIR /app/text-remove/CRAFT-pytorch
|
| 50 |
#COPY --chown=user . $HOME/app/text-remove/CRAFT-pytorch
|
| 51 |
RUN wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1Jk4eGD7crsqCCg9C9VjCLkMN3ze8kutZ' -O "craft_mlt_25k.pth"
|
| 52 |
RUN pip install gdown
|
| 53 |
RUN gdown 1XSaFwBkOaFOdtk4Ane3DFyJGPRw6v5bO
|
| 54 |
|
| 55 |
# Set up lama
|
| 56 |
+
WORKDIR /app/text-remove/lama
|
| 57 |
#COPY --chown=user . $HOME/app/text-remove/lama
|
| 58 |
RUN curl -LJO https://huggingface.co/smartywu/big-lama/resolve/main/big-lama.zip
|
| 59 |
RUN unzip big-lama.zip
|
| 60 |
|
| 61 |
+
#RUN chmod 777 app/text-remove/target_test
|
| 62 |
+
#RUN chmod 777 app/text-remove/test_folder
|
| 63 |
|
| 64 |
# RUN useradd -m -u 1000 user
|
| 65 |
# USER user
|
|
|
|
| 67 |
# ENV PATH $HOME/.local/bin:$PATH
|
| 68 |
|
| 69 |
# Set the working directory back to the root of the project
|
| 70 |
+
WORKDIR /app/text-remove
|
| 71 |
|
| 72 |
# Make port 7860 available to the world outside this container
|
| 73 |
EXPOSE 7860
|
| 74 |
|
| 75 |
+
ENV PYTHONPATH=/app/text-remove
|
| 76 |
|
| 77 |
# Run app.py when the container launches
|
| 78 |
ENTRYPOINT ["streamlit", "run"]
|