Comments (6)
I imagine this would help windows users too:
from taskmatrix.
Here are the two I have tried:
# Start with the official PyTorch image
FROM pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime
# Set the working directory
WORKDIR /app
# Install necessary packages
RUN apt-get update && apt-get install -y \
ffmpeg \
libsm6 \
libxext6 \
libfontconfig1 \
libxrender1 \
&& rm -rf /var/lib/apt/lists/*
# Copy files to the working directory
COPY visual_chatgpt.py requirement.txt download.sh ./
# Create a new environment and install dependencies
RUN conda create -n visgpt python=3.8 && \
echo "conda activate visgpt" >> ~/.bashrc && \
/bin/bash -c "source ~/.bashrc" && \
pip install --no-cache-dir -r requirement.txt && \
bash download.sh && \
conda clean --all --yes && \
rm -rf /opt/conda/pkgs/*
# Set an environment variable for the OpenAI API key
ENV OPENAI_API_KEY=${OPENAI_API_KEY}
# Create a new directory for the generated images
RUN mkdir /app/image && chmod 777 /app/image
# Start the application
CMD ["bash", "-c", "python visual_chatgpt.py"]
FROM python:3.8-slim-buster
WORKDIR /app
COPY visual_chatgpt.py requirement.txt download.sh ./
RUN apt-get update && \
apt-get install -y git && \
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirement.txt && \
bash download.sh && \
apt-get remove -y git && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV OPENAI_API_KEY=${OPENAI_API_KEY}
RUN mkdir /app/image && chmod 777 /app/image
CMD ["bash", "-c", "python visual_chatgpt.py"]
from taskmatrix.
do they work? why two docker files?
Also the download.sh should be optional because its like 40GB of download. better bind the folder and maybe let users copy models manually or link them or whatever.
Do these dockerfiles work on windows? i havent tried it.
from taskmatrix.
@andzejsp I think that @danstarns wanted to try both pip
and conda
environments. That's why he's provided two Dockerfiles.
Why don't you try it by yourself on Windows?
from taskmatrix.
Just to add my 2 cents, I am still testing it though. Tried resolving the OpenCV version issue #50.
FROM python:3.8-slim-buster
ENV OPENAI_API_KEY=${OPENAI_API_KEY}
ENV PYTHONFAULTHANDLER=1 \
PYTHONHASHSEED=random \
PYTHONUNBUFFERED=1
RUN apt-get update -y
RUN apt-get install -y git curl wget
RUN git clone https://github.com/microsoft/visual-chatgpt.git
WORKDIR /visual-chatgpt/
RUN pip install --upgrade pip
RUN pip install opencv-python
RUN sed '/opencv/d' requirement.txt > requirement.txt
RUN pip install -r requirement.txt
RUN bash download.sh
RUN mkdir /visual-chatgpt/image && chmod 777 /visual-chatgpt/image
CMD ["bash", "-c", "python", "visual_chatgpt.py"]
from taskmatrix.
Anyone managed to run the newest version in docker?
from taskmatrix.
Related Issues (20)
- An error occurs when executing pip install git+https://github.com/IDEA-Research/GroundingDINO.git HOT 1
- Project dead?
- Aziz
- Unknown error for me
- Network error HOT 1
- Based on feedback from the API call, I've some changes to the API:
- Error:metadata-generation-failed and subprocess-exited-with-error
- AttributeError: module 'cv2.gapi' has no attribute 'wip' HOT 2
- AttributeError: module 'openai' has no attribute 'error' HOT 1
- Why millions of API in the title? HOT 1
- AttributeError: 'ConversationBot' object has no attribute 'agent'
- Migrate text-davinci-003 to gpt-3.5-turbo-instruct
- No module named 'groundingdino' because error occurs when !pip install git+https://github.com/IDEA-Research/GroundingDINO.git When using Colab
- Online demo fails to work, please fix it.
- Can we use GPT-4?
- subprocess.CalledProcessError: Command '['D:\\Anaconda3\\envs\\pydiff\\python.exe', '-u', 'pydiff/train.py', '--local_rank=0', '-opt', 'options/train_v2.yaml', '--launcher', 'pytorch']' returned non-zero exit status 1.
- New versions of openai don't work with this AttributeError: module 'openai' has no attribute 'error' HOT 1
- Can we use third-party openAI key?
- metadata-generation-failed
- gg
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taskmatrix.