Closed cloverhsc closed 7 years ago
有先試著照著openai gym的指示安裝全部相依的套件嗎? https://github.com/openai/gym
在ubuntu下執行這一行
sudo apt-get install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl libboost-all-dev libsdl2-dev swig
2017-05-25 19:01 GMT+08:00 Clover Hsu notifications@github.com:
Hi nailo2c: 我是上個禮拜參加pycon2017課程的同學,我自己在自己的機器上面不跑docker情況下用python3 virtualenv下,把該裝的lib都裝了,跑run_MountainCar.py是可以正常運作。 但是要執行pg_tf.py (使用 xvfb-run -s "-screen 1 1400x900x24" python pg_tf.py) 就會出現 pyglet.gl.glx_info.GLXInfoException: pyglet requires an X server with GLX
參考一些網站有去apt-get org-dev libglu1-mesa libgl1-mesa-dev libxinerama1 libxcursor1 本機也有裝顯示卡driver, xvfb , cuda $echo $DISPLAY 是:1 也沒問題 作業系統是ubuntu 16.04 不知道nailo2c有遇過這個問題嗎?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nailo2c/PyCon2017TutorialRL/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AK3NLgR3hoXC8u7_pXin0GGoRqbeGbLiks5r9V-PgaJpZM4NmQAJ .
Hi nailo2c: 都裝了也是一樣。 附圖:
[image: 內置圖片 1]
-----------------------------------------執行結果-----------------------------------------------------------
(venv) cloverhsc@cloverhsc-desktop:~/python3$ xvfb-run -s "-screen 1
1400x900x24" python pg_keras.py
Using TensorFlow backend.
[2017-05-26 09:47:13,499] Making new env: Pong-v0
[2017-05-26 09:47:13,645] Clearing 4 monitor files from previous run
(because force=True was provided)
[2017-05-26 09:47:13,652] Starting new video recorder writing to
/home/cloverhsc/python3/pong/openaigym.video.0.487.video000000.mp4
pg_keras.py:27: UserWarning: Update your Conv2D
call to the Keras 2 API:
Conv2D(32, activation="relu", strides=(3, 3), padding="same", kernel_size=(6, 6), kernel_initializer="he_uniform")
model.add(Conv2D(32, kernel_size=(6, 6), strides=(3, 3),
border_mode='same', activation='relu', init='he_uniform'))
pg_keras.py:29: UserWarning: Update your Dense
call to the Keras 2 API:
Dense(64, activation="relu", kernel_initializer="glorot_normal")
model.add(Dense(64, activation='relu', init='glorot_normal'))
pg_keras.py:30: UserWarning: Update your Dense
call to the Keras 2 API:
Dense(32, activation="relu", kernel_initializer="glorot_normal")
model.add(Dense(32, activation='relu', init='glorot_normal'))
reshape_1 (Reshape) (None, 80, 80, 1) 0
conv2d_1 (Conv2D) (None, 27, 27, 32) 1184
flatten_1 (Flatten) (None, 23328) 0
dense_1 (Dense) (None, 64) 1493056
dense_2 (Dense) (None, 32) 2080
Total params: 1,496,518 Trainable params: 1,496,518 Non-trainable params: 0
2017-05-26 09:47:13.733630: W
tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library
wasn't compiled to use SSE4.1 instructions, but these are available on your
machine and could speed up CPU computations.
2017-05-26 09:47:13.733653: W
tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library
wasn't compiled to use SSE4.2 instructions, but these are available on your
machine and could speed up CPU computations.
2017-05-26 09:47:13.733659: W
tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library
wasn't compiled to use AVX instructions, but these are available on your
machine and could speed up CPU computations.
2017-05-26 09:47:13.733665: W
tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library
wasn't compiled to use AVX2 instructions, but these are available on your
machine and could speed up CPU computations.
2017-05-26 09:47:13.733670: W
tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library
wasn't compiled to use FMA instructions, but these are available on your
machine and could speed up CPU computations.
Traceback (most recent call last):
File "pg_keras.py", line 100, in
nailo2c notifications@github.com 於 2017年5月25日 下午8:56 寫道:
有先試著照著openai gym的指示安裝全部相依的套件嗎? https://github.com/openai/gym
在ubuntu下執行這一行
sudo apt-get install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl libboost-all-dev libsdl2-dev swig
2017-05-25 19:01 GMT+08:00 Clover Hsu notifications@github.com:
Hi nailo2c: 我是上個禮拜參加pycon2017課程的同學,我自己在自己的機器上面不跑docker情況下用python3 virtualenv下,把該裝的lib都裝了,跑run_MountainCar.py是可以正常運作。 但是要執行pg_tf.py (使用 xvfb-run -s "-screen 1 1400x900x24" python pg_tf.py) 就會出現 pyglet.gl.glx_info.GLXInfoException: pyglet requires an X server with GLX
參考一些網站有去apt-get org-dev libglu1-mesa libgl1-mesa-dev libxinerama1 libxcursor1 本機也有裝顯示卡driver, xvfb , cuda $echo $DISPLAY 是:1 也沒問題 作業系統是ubuntu 16.04 不知道nailo2c有遇過這個問題嗎?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nailo2c/PyCon2017TutorialRL/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AK3NLgR3hoXC8u7_ pXin0GGoRqbeGbLiks5r9V-PgaJpZM4NmQAJ .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nailo2c/PyCon2017TutorialRL/issues/1#issuecomment-304003634, or mute the thread https://github.com/notifications/unsubscribe-auth/AFzZElLRGHQQq0Xo-zraNK7vOHvi95bfks5r9XqDgaJpZM4NmQAJ .
改跑這行看看 xvfb-run -a -s "-screen 1 1400x900x24" python pg_tf.py 可能是之前開的虛擬螢幕被佔走了,加一個-a試試看
Nvidia driver 381.22
2017-05-26 11:18 GMT+08:00 nailo2c notifications@github.com:
改跑這行看看 xvfb-run -a -s "-screen 1 1400x900x24" python pg_tf.py 可能是之前開的虛擬螢幕被佔走了,加一個-a試試看
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nailo2c/PyCon2017TutorialRL/issues/1#issuecomment-304180653, or mute the thread https://github.com/notifications/unsubscribe-auth/AFzZEuGDGFBNHen7ae2mvrPntxXGuGfrks5r9kSPgaJpZM4NmQAJ .
啊,想起來了,可能是CUDA安裝時的問題,安裝時要用--no-opengl-libs指令,例如:
sudo bash cuda_8.0.61_375.26_linux.run --no-opengl-libs
記得去抓.run檔,一般的deb檔都包起來了。
可參考當天另外一位講者的環境建置 https://sites.google.com/view/caigame/%E9%A6%96%E9%A0%81/%E5%BB%BA%E7%BD%AE
Hi nailo2c: 我是上個禮拜參加pycon2017課程的同學,我自己在自己的機器上面不跑docker情況下用python3 virtualenv下,把該裝的lib都裝了,跑run_MountainCar.py是可以正常運作。 但是要執行pg_tf.py (使用 xvfb-run -s "-screen 1 1400x900x24" python pg_tf.py) 就會出現 pyglet.gl.glx_info.GLXInfoException: pyglet requires an X server with GLX
參考一些網站有去apt-get org-dev libglu1-mesa libgl1-mesa-dev libxinerama1 libxcursor1 本機也有裝顯示卡driver, xvfb , cuda $echo $DISPLAY 是:1 也沒問題 作業系統是ubuntu 16.04 不知道nailo2c有遇過這個問題嗎?