Spaces:
Sleeping
Sleeping
Commit ·
1af1777
1
Parent(s): 0cf770a
update
Browse files1 unmodified line234567815 unmodified lines242526272829303132333435363738394041424344454647484950515253545556575859606162631 unmodified lineFROM python:3.8# Set the working directory in the containerWORKDIR /app# Install system dependenciesRUN apt-get update && apt-get install -y \15 unmodified lines&& rm -rf /var/lib/apt/lists/* \&& apt-get cleanWORKDIR /appCOPY --chown=user . /app# Create .streamlit/config.toml fileRUN mkdir -p /app/.streamlit && \echo "[server]\nenableXsrfProtection = false\nenableCORS = false" > /app/.streamlit/config.toml# Clone the repositoryRUN git clone https://github.com/nguyen-brat/text-remove.git /app/text-remove# Set the working directory to the cloned repoWORKDIR /app/text-removeCOPY --chown=user . /app/text-removeRUN mkdir -p /app/text-remove/.streamlit && \echo "[server]\nenableXsrfProtection = false\nenableCORS = false" > /app/text-remove/.streamlit/config.toml# Install Python dependenciesCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# Set up CraftWORKDIR /app/text-remove/CRAFT-pytorchCOPY --chown=user . /app/text-remove/CRAFT-pytorchRUN wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1Jk4eGD7crsqCCg9C9VjCLkMN3ze8kutZ' -O "craft_mlt_25k.pth"RUN pip install gdownRUN gdown 1XSaFwBkOaFOdtk4Ane3DFyJGPRw6v5bO# Set up lamaWORKDIR /app/text-remove/lamaCOPY --chown=user . /app/text-remove/lamaRUN curl -LJO https://huggingface.co/smartywu/big-lama/resolve/main/big-lama.zipRUN unzip big-lama.zip# Set the working directory back to the root of the projectWORKDIR /app/text-remove# Make port 7860 available to the world outside this containerEXPOSE 78601 unmodified line2345678910111215 unmodified lines2829303132333435363738394041424344454647484950515253545556575859606162636465666768691 unmodified lineFROM python:3.8# Set the working directory in the containerWORKDIR $HOME/appCOPY --chown=user . $HOME/appRUN useradd -m -u 1000 userUSER user# Install system dependenciesRUN apt-get update && apt-get install -y \15 unmodified lines&& rm -rf /var/lib/apt/lists/* \&& apt-get cleanWORKDIR $HOME/app# Create .streamlit/config.toml fileRUN mkdir -p /app/.streamlit && \echo "[server]\nenableXsrfProtection = false\nenableCORS = false" > /app/.streamlit/config.toml# Clone the repositoryRUN git clone https://github.com/nguyen-brat/text-remove.git $HOME/app/text-remove# Set the working directory to the cloned repoWORKDIR $HOME/app/text-removeCOPY --chown=user . $HOME/app/text-removeRUN mkdir -p $HOME/app/text-remove/.streamlit && \echo "[server]\nenableXsrfProtection = false\nenableCORS = false" > $HOME/app/text-remove/.streamlit/config.toml# Install Python dependenciesCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# Set up CraftWORKDIR $HOME/app/text-remove/CRAFT-pytorchCOPY --chown=user . $HOME/app/text-remove/CRAFT-pytorchRUN wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1Jk4eGD7crsqCCg9C9VjCLkMN3ze8kutZ' -O "craft_mlt_25k.pth"RUN pip install gdownRUN gdown 1XSaFwBkOaFOdtk4Ane3DFyJGPRw6v5bO# Set up lamaWORKDIR $HOME/app/text-remove/lamaCOPY --chown=user . $HOME/app/text-remove/lamaRUN curl -LJO https://huggingface.co/smartywu/big-lama/resolve/main/big-lama.zipRUN unzip big-lama.zip# Set the working directory back to the root of the projectWORKDIR $HOME/app/text-removeRUN chmod 777 $HOME/app/text-remove/target_testRUN chmod 777 $HOME/app/text-remove/test_folder# Make port 7860 available to the world outside this containerEXPOSE 7860
Dockerfile+19-13