You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.2 KiB
44 lines
1.2 KiB
FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
libgl1-mesa-glx \
|
|
libglib2.0-0 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
# until we hack around gitpython, we need git
|
|
# RUN apt-get update && apt-get install -y \
|
|
# git \
|
|
# && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
# create a safe user
|
|
RUN useradd -ms /bin/bash eden
|
|
# make them own /app
|
|
RUN chown eden:eden /app
|
|
|
|
USER eden
|
|
# add /home/eden/.local/bin to PATH
|
|
ENV PATH="/home/eden/.local/bin:${PATH}"
|
|
RUN pip install eden-python
|
|
RUN pip install python-socketio[asyncio_server] aiohttp
|
|
COPY server.py .
|
|
COPY announce.py .
|
|
RUN touch __init__.py
|
|
# attempted bugfix
|
|
COPY image_utils.py /home/eden/.local/lib/python3.10/site-packages/eden/image_utils.py
|
|
# attempt git-python hackaround
|
|
COPY hosting.py /home/eden/.local/lib/python3.10/site-packages/eden/hosting.py
|
|
|
|
EXPOSE 5656
|
|
# ENV GIT_PYTHON_REFRESH=quiet
|
|
# hack around gitpython
|
|
# RUN git init .
|
|
# RUN git config --global user.email "none@site.com"
|
|
# RUN git config --global user.name "eden-service-user"
|
|
# # add fake remote upstream
|
|
# RUN git remote add origin https://git.clfx.cc/mm/eden-app.git
|
|
# RUN git add server.py
|
|
# RUN git commit -am "initial commit"
|
|
ENV GIT_PYTHON_REFRESH=quiet
|
|
CMD ["python", "server.py"]
|