Spaces:
Build error
Build error
Commit
·
dd150fe
1
Parent(s):
a24f25c
fix docker
Browse files- Dockerfile +13 -5
Dockerfile
CHANGED
|
@@ -1,20 +1,28 @@
|
|
| 1 |
FROM continuumio/miniconda3
|
| 2 |
|
| 3 |
-
COPY . /code
|
| 4 |
-
|
| 5 |
-
WORKDIR /code
|
| 6 |
-
|
| 7 |
RUN apt-get update && apt-get install --no-install-recommends -y \
|
| 8 |
build-essential \
|
| 9 |
libxml2 \
|
| 10 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
# Install dependencies
|
| 13 |
RUN conda create -n pose python=3.8
|
| 14 |
|
| 15 |
# Make RUN commands use the new environment:
|
| 16 |
SHELL ["conda", "run", "-n", "pose", "/bin/bash", "-c"]
|
| 17 |
|
|
|
|
|
|
|
| 18 |
RUN pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118
|
| 19 |
|
| 20 |
RUN pip install -r requirements.txt
|
|
@@ -26,4 +34,4 @@ RUN pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable"
|
|
| 26 |
RUN wget https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors -P pretrained-models
|
| 27 |
RUN wget https://huggingface.co/stabilityai/sdxl-vae/resolve/main/sdxl_vae.safetensors -P pretrained-models
|
| 28 |
|
| 29 |
-
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "pose", "python", "app.py"
|
|
|
|
| 1 |
FROM continuumio/miniconda3
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
RUN apt-get update && apt-get install --no-install-recommends -y \
|
| 4 |
build-essential \
|
| 5 |
libxml2 \
|
| 6 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
+
RUN useradd -m -u 1000 user
|
| 9 |
+
USER user
|
| 10 |
+
ENV HOME=/home/user
|
| 11 |
+
ENV PATH=/home/user/.local/bin:$PATH
|
| 12 |
+
|
| 13 |
+
WORKDIR $HOME/app
|
| 14 |
+
|
| 15 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 16 |
+
COPY --chown=user . $HOME/app
|
| 17 |
+
|
| 18 |
# Install dependencies
|
| 19 |
RUN conda create -n pose python=3.8
|
| 20 |
|
| 21 |
# Make RUN commands use the new environment:
|
| 22 |
SHELL ["conda", "run", "-n", "pose", "/bin/bash", "-c"]
|
| 23 |
|
| 24 |
+
# Set gradio env variables?
|
| 25 |
+
|
| 26 |
RUN pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118
|
| 27 |
|
| 28 |
RUN pip install -r requirements.txt
|
|
|
|
| 34 |
RUN wget https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors -P pretrained-models
|
| 35 |
RUN wget https://huggingface.co/stabilityai/sdxl-vae/resolve/main/sdxl_vae.safetensors -P pretrained-models
|
| 36 |
|
| 37 |
+
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "pose", "python", "app.py"]
|