Spaces:
Paused
Paused
Suprhimp
commited on
Commit
•
745b10c
1
Parent(s):
e1fffbd
update
Browse files- Dockerfile +8 -0
- opengl.py +1 -0
Dockerfile
CHANGED
@@ -7,8 +7,16 @@ COPY ./requirements.txt /code/requirements.txt
|
|
7 |
RUN apt-cache search mesa
|
8 |
RUN apt-get update && apt-get install -y libgl1-mesa-glx libosmesa6
|
9 |
RUN apt-get install -y python3-opengl
|
|
|
10 |
RUN apt-get upgrade -y && apt-get install -y python3-pip python-is-python3 && rm -rf /var/lib/apt/lists/*
|
11 |
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
# Run the command inside your image filesystem
|
14 |
# RUN pip install --upgrade pip && \
|
|
|
7 |
RUN apt-cache search mesa
|
8 |
RUN apt-get update && apt-get install -y libgl1-mesa-glx libosmesa6
|
9 |
RUN apt-get install -y python3-opengl
|
10 |
+
RUN apt update && apt install -y python3 python3-pip git python-opengl xvfb xorg-dev cmake
|
11 |
RUN apt-get upgrade -y && apt-get install -y python3-pip python-is-python3 && rm -rf /var/lib/apt/lists/*
|
12 |
RUN pip install -r requirements.txt
|
13 |
+
RUN mkdir /projects
|
14 |
+
RUN git clone https://github.com/glfw/glfw.git /projects/glfw
|
15 |
+
RUN cd /projects/glfw
|
16 |
+
RUN cmake -DBUILD_SHARED_LIBS=ON .
|
17 |
+
RUN make
|
18 |
+
RUN export PYGLFW_LIBRARY=/projects/glfw/src/libglfw.so
|
19 |
+
RUN xvfb-run python3 some_script_using_pyopengl_and_glfw.py
|
20 |
|
21 |
# Run the command inside your image filesystem
|
22 |
# RUN pip install --upgrade pip && \
|
opengl.py
CHANGED
@@ -30,6 +30,7 @@ def image_enhance(image, exposure, saturation, contrast, brightness, gamma, shad
|
|
30 |
|
31 |
# Create window
|
32 |
# Size (1, 1) for show nothing in window
|
|
|
33 |
window = glfw.create_window(1, 1, "My OpenGL window", None, None)
|
34 |
# window = glfw.create_window(800, 600, "My OpenGL window", None, None)
|
35 |
|
|
|
30 |
|
31 |
# Create window
|
32 |
# Size (1, 1) for show nothing in window
|
33 |
+
glfw.window_hint(glfw.VISIBLE, False)
|
34 |
window = glfw.create_window(1, 1, "My OpenGL window", None, None)
|
35 |
# window = glfw.create_window(800, 600, "My OpenGL window", None, None)
|
36 |
|