clay-lab / transductions

A PyTorch framework for creating, running, and reproducing experiments on seq2seq models.
6 stars 3 forks source link

Conda gets stuck on "Solving environment" phase #63

Open bdusell opened 2 years ago

bdusell commented 2 years ago

Hi,

Thanks for this nice library. I'm trying to build the provided Docker image on an x86_64 Linux machine, but Conda appears to get stuck on the "Solving environment" step.

$ docker compose -f .devcontainer/docker-compose.yaml build --progress=plain
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 782B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 transferring context: 34B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/library/ubuntu:focal
#3 DONE 0.2s

#4 [ 1/10] FROM docker.io/library/ubuntu:focal@sha256:fd92c36d3cb9b1d027c4d2a72c6bf0125da82425fc2ca37c414d4f010180dc19
#4 DONE 0.0s

#5 [internal] load build context
#5 transferring context: 73B done
#5 DONE 0.1s

#6 [ 2/10] RUN apt-get update
#6 CACHED

#7 [ 3/10] RUN apt-get install -y wget git && rm -rf /var/lib/apt/lists/*
#7 CACHED

#8 [ 4/10] RUN wget       https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh       -O ~/miniconda.sh     && chmod +x ~/miniconda.sh     && bash ~/miniconda.sh -b -p /usr/local/bin/miniconda3     && rm -f ~/miniconda.sh
#8 CACHED

#9 [ 5/10] COPY environment.yaml requirements.txt /tmp/conda-tmp/
#9 CACHED

#10 [ 6/10] RUN umask 0002     && conda env update -n base -f /tmp/conda-tmp/environment.yaml     && rm -rf /tmp/conda-tmp
#10 1.006 
#10 1.006 EnvironmentSectionNotValid: The following section on '/tmp/conda-tmp/environment.yaml' is invalid and will be ignored:
#10 1.006  - platforms
#10 1.006 
#10 1.006 Collecting package metadata (repodata.json): ...working... done
#10 64.59 Solving environment: ...working... 

I gave up after letting it run for about 12 hours.

Here's my modified Dockerfile and environment.yaml:

FROM ubuntu:focal

RUN apt-get update
RUN apt-get install -y wget git && rm -rf /var/lib/apt/lists/*

ENV CONDA_DIR="/usr/local/bin/miniconda3"
ENV PATH="$CONDA_DIR/bin:$PATH"

RUN wget \
      https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
      -O ~/miniconda.sh \
    && chmod +x ~/miniconda.sh \
    && bash ~/miniconda.sh -b -p $CONDA_DIR \
    && rm -f ~/miniconda.sh

COPY environment.yaml requirements.txt /tmp/conda-tmp/
RUN umask 0002 \ 
    && conda env update -n base -f /tmp/conda-tmp/environment.yaml \
    && rm -rf /tmp/conda-tmp

RUN useradd -rm -d /home/user -s /bin/bash -g root -G sudo -u 1001 user
USER user
WORKDIR /home/user

RUN mkdir /home/user/transductions
WORKDIR /home/user/transductions 
name: transd

channels:
  - pytorch
  - conda-forge

dependencies:
  - python=3.8
  - pytorch=1.8.1
  - torchtext=0.6.0
  - ipykernel=6.4.1
  - tqdm=4.62.3
  - tensorboard=2.6.0
  - pip=21.2.4
  - matplotlib=3.4.3
  - transformers=4.14.1
  - ipympl=0.7.0
  - pandas=1.3.4
  - conda-lock=0.13.2
  - pip:
    - -r requirements.txt

platforms:
 - linux-64

Apparently linux-64 is not a valid platform string, but Conda doesn't seem to have a list of acceptable values documented anywhere online.