|
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime |
|
|
|
SHELL ["/bin/bash", "-c"] |
|
|
|
|
|
ENV HF_HOME=/app/hf_cache |
|
ENV TRANSFORMERS_CACHE=/app/hf_cache |
|
ENV HF_TOKEN=${HF_TOKEN} |
|
ENV PATH=/opt/conda/bin:$PATH |
|
|
|
RUN apt-get update && apt-get install -y \ |
|
git wget curl unzip ffmpeg libgl1-mesa-glx libglib2.0-0 && \ |
|
apt-get clean |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY . /app |
|
|
|
|
|
RUN mkdir -p /app/pretrained /app/hf_cache /.cache/gdown && \ |
|
chmod -R 777 /app && \ |
|
chmod -R 777 /.cache && \ |
|
chmod -R 777 /root |
|
|
|
|
|
COPY requirements.txt /app/requirements.txt |
|
RUN conda create -n epic python=3.10 -y && \ |
|
conda run -n epic pip install --upgrade pip && \ |
|
conda run -n epic pip install -r /app/requirements.txt |
|
|
|
RUN chmod -R 777 /app /workspace |
|
|
|
|
|
RUN ls -la /app |
|
RUN pip install gradio |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["conda", "run", "--no-capture-output", "-n", "epic", "python", "gradio_app.py"] |