FROM diffuser:r200-8f ENV HF_ENDPOINT=https://hf-mirror.com RUN /root/miniconda/envs/python38_torch201_cuda/bin/python3 -m pip install transformers==4.46.3 uvicorn\[standard\] fastapi -i https://pypi.tuna.tsinghua.edu.cn/simple WORKDIR /app COPY ./ /app RUN sed -i 's/(inv_freq_expanded\.float() @ position_ids_expanded\.float())/(inv_freq_expanded.float().clone() @ position_ids_expanded.float().clone())/g' /root/miniconda/envs/python38_torch201_cuda/lib/python3.8/site-packages/transformers/models/llama/modeling_llama.py EXPOSE 8000 CMD ["sh", "-c", "/root/miniconda/envs/python38_torch201_cuda/bin/python3 server.py"]