gitpod-io / gitpod

The developer platform for on-demand cloud development environments to create software faster and more securely.
https://www.gitpod.io
GNU Affero General Public License v3.0
12.77k stars 1.22k forks source link

Would you add libGL.so.1 to the container? #471

Closed hidehiro98 closed 5 years ago

hidehiro98 commented 5 years ago

https://github.com/alifelab/alife_book_src/blob/master/chap02/gray_scott.py

When I run this code, I cannot use this because I cannot install libGL.so.1. If possible, would you add this library?

hidehiro98 commented 5 years ago

FYI https://packages.ubuntu.com/search?suite=xenial&arch=any&mode=filename&searchon=contents&keywords=libGL.so.1

jankeromnes commented 5 years ago

Hi @hidehiro98, thank you for reaching out!

You can easily install new dependencies by adding configuration files like these to your repository:

.gitpod.yml:

image:
  file: .gitpod.dockerfile

.gitpod.dockerfile:

FROM gitpod/workspace-full-vnc

RUN sudo apt-get update \
 && sudo apt-get install -y libgl1 \
 && rm -rf /var/lib/apt/lists/*

(Note: I assume that you'll need a graphical environment, so I picked the base image gitpod/workspace-full-vnc, which includes a X11 server and a web-based VNC client that allows you to view and interact with graphical applications).

See also:

geropl commented 5 years ago

Hi @hidehiro98 ,

you can add it to the .gitpod.yml for your project yourself: Just add a .gitpod.yml with these contents:

image:
  file: .gitpod.dockerfile

and a .gitpod.dockerfile like so:

FROM gitpod/workspace-full-vnc

RUN apt-get update && apt-get install -yq \
        libgl1-mesa-glx \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*

After you pushed the change, just re-open your project in a Gitpod and it should be there!

hidehiro98 commented 5 years ago

Wow, thank you very much both @jankeromnes @geropl, I'll try this later!

hidehiro98 commented 5 years ago

@jankeromnes @geropl, it worked! Thank you so much.