Skip to content

Commit 8de5d8d

Browse files
committed
[sapiens] Fixed lite
1 parent 9b0d397 commit 8de5d8d

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

sapiens/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ This Dockerfile enables plug&play start for the sapiens foundational models for
1818

1919
Folder lite contains docker that builds environment only for the sapiens inference.
2020

21+
Weights for the sapiens lite can be found [here](https://huggingface.co/facebook/sapiens/tree/main/sapiens_lite_host).
22+
2123
### Full
2224

2325
Folder full contains Dockerfile that builds environment for the training (fine-tuning) env for sapiens.

sapiens/lite/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ RUN apt-get update -y && \
1313
WORKDIR /root
1414

1515
# Conda
16-
#ENV CONDA_DIR /opt/conda
17-
#RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
18-
# /bin/bash ~/miniconda.sh -b -p /opt/conda
16+
ENV CONDA_DIR /opt/conda
17+
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
18+
/bin/bash ~/miniconda.sh -b -p /opt/conda
1919

2020
# Put conda in path so we can use conda activate
2121
ENV PATH=$CONDA_DIR/bin:$PATH
@@ -29,7 +29,7 @@ ENV SAPIENS_LITE_ROOT=$SAPIENS_ROOT/lite
2929

3030
# Conda in docker: https://medium.com/@chadlagore/conda-environments-with-docker-82cdc9d25754
3131
# Conda in docker: https://pythonspeed.com/articles/activate-conda-dockerfile/
32-
# Minimal sapiens_lite conda env
32+
# Minimal sapiens_lite conda env
3333
RUN conda init bash \
3434
&& . ~/.bashrc \
3535
&& conda create --name sapiens_lite python=3.10 \

sapiens/lite/first_run.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
xhost local:root
4+
5+
CONTAINER_NAME=sapiens_lite_cont
6+
IMAGE_NAME=sapiens_img:lite
7+
8+
# Hook to the current SSH_AUTH_LOCK - since it changes
9+
# https://www.talkingquickly.co.uk/2021/01/tmux-ssh-agent-forwarding-vs-code/
10+
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
11+
12+
docker run \
13+
-it \
14+
--network host \
15+
--privileged \
16+
--gpus all \
17+
--volume /dev:/dev \
18+
--volume /tmp/.x11-unix:/tmp/.x11-unix \
19+
--volume ~/.ssh/ssh_auth_sock:/ssh-agent \
20+
--env SSH_AUTH_SOCK=/ssh-agent \
21+
--env DISPLAY=$DISPLAY \
22+
--env TERM=xterm-256color \
23+
--name $CONTAINER_NAME \
24+
$IMAGE_NAME \
25+
/bin/bash

0 commit comments

Comments
 (0)