Docker Image Not Building/Running Correctly

I created the docker image using the guide and build.sh.
Running the docker command:
docker run --rm --env OTC_EVALUATION_ENABLED=true --env OTC_DEMO_EVALUATION=true --network=host -it obstacle_tower_challenge:latest ./run.sh

produces the following error:

root
Traceback (most recent call last):
  File "run.py", line 1, in <module>
    from obstacle_tower_env import ObstacleTowerEnv
  File "/home/aicrowd/obstacle_tower_env.py", line 2, in <module>
    from PIL import Image
ModuleNotFoundError: No module named 'PIL'

And as a result, my submission times out and my agent never runs.

My requirements.txt file has the following

git+git://github.com/Unity-Technologies/obstacle-tower-env@v2.2
aicrowd-repo2docker

I tried adding pillow and specific versions of pillow, but Pillow seems to get installed as a prereq for obstacle-tower-env as it also requires ml-agents.

Does anyone have any suggestions?

Did you remember to export your conda environment into the environment.yaml file ?
And if so, was PIL installed there ?

Mohanty, is there an updated guide somewhere, or a good resource on this?

I added the environment.yaml file and now I am getting the following:

Step 41/48 : RUN conda env update -p ${NB_PYTHON_PREFIX} -f "environment.yml" && conda clean -tipsy && conda list -p ${NB_PYTHON_PREFIX} && rm -rf /srv/conda/pkgs
 ---> Running in abf80ea109d7
Collecting package metadata: ...working... done
Solving environment: ...working... failed

ResolvePackageNotFound: 
  - python==3.6.8=haf84260_0
  - sqlite==3.27.2=ha441bb4_0
  - readline==7.0=h1de35cc_5
  - pyrsistent=py36h1de35cc_0
  - libffi==3.2.1=h475c297_4
  - tk==8.6.8=ha441bb4_0
  - ncurses==6.1=h0a44026_1
  - openssl==1.1.1b=h1de35cc_1
  - xz==5.2.4=h1de35cc_4
  - tornado==6.0.2=py36h1de35cc_0
  - zlib==1.2.11=h1de35cc_3
  - libgfortran==3.0.1=h93005f0_2
  - libedit==3.1.20181209=hb402a30_0
  - freetype==2.9.1=hb4e5f40_0
  - jpeg==9b=he5867d9_2
  - libcxx==4.0.1=hcfea43d_1
  - ninja==1.9.0=py36h04f5b5a_0
  - c-ares==1.15.0=h1de35cc_1
  - libtiff==4.0.10=hcb84e12_2
  - libcxxabi==4.0.1=hcfea43d_1
  - mkl_random==1.0.2=py36h27c97d8_0
  - libprotobuf==3.6.1=hd9629dc_0
  - h5py==2.9.0=py36h3134771_0
  - tensorflow==1.12.0=mkl_py36h2b2bbaf_0
  - swig==3.0.12=h1cb45b9_3
  - libpng==1.6.36=ha441bb4_0
  - tensorboard==1.12.2=py36haf313ee_0
  - tensorflow-base==1.12.0=mkl_py36h70e0e9a_0
  - cffi==1.12.2=py36hb5b8e2f_1
  - hdf5==1.10.4=hfa1e0ec_0
  - mkl_fft==1.0.10=py36h5e564d8_0
  - zstd==1.3.7=h5bba6e5_0
  - pcre==8.43=h0a44026_0

Removing intermediate container abf80ea109d7
The command '/bin/sh -c conda env update -p ${NB_PYTHON_PREFIX} -f "environment.yml" && conda clean -tipsy && conda list -p ${NB_PYTHON_PREFIX} && rm -rf /srv/conda/pkgs' returned a non-zero code: 1The command '/bin/sh -c conda env update -p ${NB_PYTHON_PREFIX} -f "environment.yml" && conda clean -tipsy && conda list -p ${NB_PYTHON_PREFIX} && rm -rf /srv/conda/pkgs' returned a non-zero code: 1
Traceback (most recent call last):
  File "/anaconda3/envs/unity-env/lib/python3.6/site-packages/repo2docker/__main__.py", line 340, in main
    r2d.start()
  File "/anaconda3/envs/unity-env/lib/python3.6/site-packages/repo2docker/app.py", line 687, in start
    self.build()
  File "/anaconda3/envs/unity-env/lib/python3.6/site-packages/repo2docker/app.py", line 673, in build
    raise docker.errors.BuildError(l['error'], build_log='')
docker.errors.BuildError: The command '/bin/sh -c conda env update -p ${NB_PYTHON_PREFIX} -f "environment.yml" && conda clean -tipsy && conda list -p ${NB_PYTHON_PREFIX} && rm -rf /srv/conda/pkgs' returned a non-zero code: 1(unity-env) Davids-MBP:submission-tower-challenge davoo$ 7~
-bash: 7~: command not found

Any assistance is appreciated.
Thanks.

@HappySlice: It seems like you did not pass the --no-build parameter, which is pinning particular builds of the packages you are using which are not available on linux.
The correct way to do this would be :

conda env export --no-build > environment.yml

which should result in the dependencies being listed as :

  - python==3.6.8
  - sqlite==3.27.2
  - readline==7.0
  - libffi==3.2.1
  - tk==8.6.8
.... and so on