image_tone_up / Dockerfile
Suprhimp
Update Dockerfile
9c1f215
raw
history blame
No virus
1.32 kB
FROM nvidia/cuda:11.7.1-base-ubuntu22.04
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN apt-cache search mesa
RUN apt-get update && apt-get install -y libgl1-mesa-glx libosmesa6
RUN apt-get install -y python3-opengl
RUN apt update && apt install -y python3 python3-pip git xvfb xorg-dev cmake
RUN apt-get upgrade -y && apt-get install -y python3-pip python-is-python3 && rm -rf /var/lib/apt/lists/*
RUN pip install -r requirements.txt
RUN mkdir /projects
RUN git clone https://github.com/glfw/glfw.git /projects/glfw
RUN cd /projects/glfw
WORKDIR /projects/glfw
RUN cmake -DBUILD_SHARED_LIBS=ON .
RUN make
RUN export PYGLFW_LIBRARY=/projects/glfw/src/libglfw.so
RUN export DISPLAY=:0.0
# Run the command inside your image filesystem
# RUN pip install --upgrade pip && \
# pip install gym && \
# pip install gym[atari] && \
# pip install PyOpenGL==3.1.0 && \
# pip install dm_control && \
# pip install tqdm && \
# pip install np_utils && \
# pip install Pillow && \
# pip install fastapi && \
# pip install uvicorn &&\
# pip install boto3
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]