-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'd787bf8e5e3d01672974b1214bab6c33e763b313' into laser
- Loading branch information
Showing
28 changed files
with
833 additions
and
883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
models/ | ||
tools-external/ | ||
notebooks/cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# CPU environment | ||
FROM ubuntu:18.04 | ||
|
||
LABEL maintainer="ceshine@ceshine.net" | ||
|
||
ARG CONDA_PYTHON_VERSION=3 | ||
ARG USERNAME=docker | ||
ARG USERID=1000 | ||
ARG CONDA_DIR=/opt/conda | ||
|
||
# Instal basic utilities | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends git wget unzip bzip2 sudo build-essential ca-certificates && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install miniconda | ||
ENV PATH $CONDA_DIR/bin:$PATH | ||
RUN wget --quiet https://repo.continuum.io/miniconda/Miniconda$CONDA_PYTHON_VERSION-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \ | ||
echo 'export PATH=$CONDA_DIR/bin:$PATH' > /etc/profile.d/conda.sh && \ | ||
/bin/bash /tmp/miniconda.sh -b -p $CONDA_DIR && \ | ||
rm -rf /tmp/* | ||
|
||
# Create the user | ||
RUN useradd --create-home -s /bin/bash --no-user-group -u $USERID $USERNAME && \ | ||
chown $USERNAME $CONDA_DIR -R && \ | ||
adduser $USERNAME sudo && \ | ||
echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | ||
|
||
USER $USERNAME | ||
WORKDIR /home/$USERNAME | ||
|
||
RUN conda install pytorch-cpu torchvision-cpu faiss-cpu -c pytorch && \ | ||
conda install cython jupyter && \ | ||
conda clean -tipsy | ||
RUN pip install jieba beautifulsoup4 && rm -rf ~/.cache/pip | ||
|
||
ENV LASER=/src | ||
COPY . /src | ||
RUN sudo chown -R $USERNAME /src | ||
WORKDIR /src | ||
|
||
# RUN conda install -y cython jupyter && \ | ||
# conda clean -tipsy | ||
RUN bash ./install_models.sh | ||
RUN bash ./install_external_tools.sh | ||
|
||
RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ | ||
echo "conda activate base" >> ~/.bashrc |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.