Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

directory structure and parameters for build unclear #1

Open
randywreed opened this issue May 19, 2021 · 1 comment
Open

directory structure and parameters for build unclear #1

randywreed opened this issue May 19, 2021 · 1 comment

Comments

@randywreed
Copy link

Hi, Thank you so much for this, this is great. I'm trying to create a fork that implements torch and transformers in the build. However build.sh fails to work and errors out as .version is not found. It looks to me like there are parameters and an assumed directory structure. Could you talk about those?

@phisanti
Copy link
Owner

I developed this dockerfile taking most of the code from the code-server GitHub. Here is the link, so maybe you can find there some inspiration. Also, the way in which I use the container is through a reference in another container link here. What I would recommend is to use as a template the second dockerfile as it is easier to use. This is what I would do:

# This should provide you with code-server in your container + CUDA 11
FROM phisanti/cuda-code-server:latest

# Install conda

RUN curl -o ~/miniconda.sh -O  https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh  && \
    chmod +x ~/miniconda.sh && \
    ~/miniconda.sh -b && \
    rm ~/miniconda.sh && \
    /home/coder/miniconda3/bin/conda install conda-build

ENV PATH=$PATH:/home/coder/miniconda3/bin/

 # Add the lines here:
RUN apt update && \
    apt install -y git \
    ca-certificates \
    python3 \
    python3-pip && \
    rm -rf /var/lib/apt/lists

RUN python3 -m pip install --no-cache-dir --upgrade pip && \
    python3 -m pip install --no-cache-dir \
    jupyter \
    tensorflow \
    torch

RUN git clone https://github.com/NVIDIA/apex
RUN cd apex && \
    python3 setup.py install && \
    pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
  
WORKDIR /workspace
COPY . transformers/
RUN cd transformers/ && \
    python3 -m pip install --no-cache-dir .
 

 # Entrypoint
# Remember to copy this file too
COPY run.sh /run.sh
EXPOSE 8888
EXPOSE 8889
EXPOSE 8890
ENTRYPOINT ["/run.sh"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants