Spaces:
Paused
Paused
Suprhimp
commited on
Commit
•
220f8ca
1
Parent(s):
a710269
Update Dockerfile
Browse files- Dockerfile +14 -11
Dockerfile
CHANGED
@@ -1,14 +1,8 @@
|
|
1 |
-
|
2 |
-
FROM tensorflow/tensorflow:2.0.0-gpu-py3
|
3 |
|
4 |
-
|
5 |
-
ENV MJKEY_PATH=/tf/mujoco200_linux/bin/mjkey.txt
|
6 |
-
ENV MUJOCO_GL=osmesa
|
7 |
-
ENV LD_LIBRARY_PATH=/tf/mujoco200_linux/bin/
|
8 |
-
ENV PYOPENGL_PLATFORM=osmesa
|
9 |
|
10 |
-
|
11 |
-
ENV PATH="/tf/.local/bin/:${PATH}"
|
12 |
|
13 |
RUN apt-cache search mesa
|
14 |
RUN apt-get update && apt-get install -y libgl1-mesa-glx libosmesa6
|
@@ -22,6 +16,15 @@ RUN pip install --upgrade pip && \
|
|
22 |
pip install tqdm && \
|
23 |
pip install np_utils && \
|
24 |
pip install opencv-python
|
25 |
-
COPY . .
|
26 |
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10
|
|
|
2 |
|
3 |
+
WORKDIR /code
|
|
|
|
|
|
|
|
|
4 |
|
5 |
+
COPY ./requirements.txt /code/requirements.txt
|
|
|
6 |
|
7 |
RUN apt-cache search mesa
|
8 |
RUN apt-get update && apt-get install -y libgl1-mesa-glx libosmesa6
|
|
|
16 |
pip install tqdm && \
|
17 |
pip install np_utils && \
|
18 |
pip install opencv-python
|
|
|
19 |
|
20 |
+
RUN useradd -m -u 1000 user
|
21 |
+
USER user
|
22 |
+
|
23 |
+
ENV HOME=/home/user \
|
24 |
+
PATH=/home/user/.local/bin:$PATH
|
25 |
+
|
26 |
+
WORKDIR $HOME/app
|
27 |
+
|
28 |
+
COPY --chown=user . $HOME/app
|
29 |
+
|
30 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", ]
|