Spaces:
Runtime error
Runtime error
sijiezhao
commited on
Commit
·
e27e6dc
1
Parent(s):
132089b
first init
Browse files- Dockerfile +39 -0
- start.sh +6 -0
Dockerfile
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Python 3.11 image
|
| 2 |
+
FROM python:3.11
|
| 3 |
+
|
| 4 |
+
# Set the working directory to /code
|
| 5 |
+
WORKDIR /code
|
| 6 |
+
|
| 7 |
+
RUN apt-get update && apt-get install -y screen git
|
| 8 |
+
RUN git lfs install
|
| 9 |
+
|
| 10 |
+
# Copy the current directory contents into the container at /code
|
| 11 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 12 |
+
|
| 13 |
+
# Install requirements.txt
|
| 14 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 15 |
+
|
| 16 |
+
# Set up a new user named "user" with user ID 1000
|
| 17 |
+
RUN useradd -m -u 1000 user
|
| 18 |
+
# Switch to the "user" user
|
| 19 |
+
USER user
|
| 20 |
+
# Set home to the user's home directory
|
| 21 |
+
ENV HOME=/home/user \
|
| 22 |
+
PATH=/home/user/.local/bin:$PATH
|
| 23 |
+
|
| 24 |
+
# Set the working directory to the user's home directory
|
| 25 |
+
WORKDIR $HOME/app
|
| 26 |
+
|
| 27 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 28 |
+
COPY --chown=user . $HOME/app
|
| 29 |
+
|
| 30 |
+
RUN git clone https://github.com/AILab-CVC/SEED.git
|
| 31 |
+
RUN RUN mv SEED/* . && rm -rf SEED
|
| 32 |
+
|
| 33 |
+
RUN git clone https://huggingface.co/AILab-CVC/SEED
|
| 34 |
+
|
| 35 |
+
RUN mv SEED/* pretrained/ && rm -rf SEED
|
| 36 |
+
|
| 37 |
+
RUN chmod +x start.sh
|
| 38 |
+
|
| 39 |
+
CMD ["./start.sh"]
|
start.sh
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
screen -S script1 -dm bash -c 'python3 gradio_demo/seed_llama_flask.py --image_transform configs/transform/clip_transform.yaml --tokenizer configs/tokenizer/seed_llama_tokenizer.yaml --model configs/llm/seed_llama_14b.yaml --port 7890 --llm_device cuda:0 --tokenizer_device cuda:0 --offload_tokenizer; exec bash'
|
| 4 |
+
screen -S script2 -dm bash -c 'python3 gradio_demo/seed_llama_gradio.py; exec bash'
|
| 5 |
+
|
| 6 |
+
tail -f /dev/null
|