dddeepseek / Dockerfile
coo7's picture
Update Dockerfile
efa0205 verified
raw
history blame contribute delete
720 Bytes
FROM python:3.10-slim
WORKDIR /app
# Create cache directory with proper permissions
RUN mkdir -p /.cache/huggingface && chmod 777 /.cache/huggingface
# 安装系统依赖
RUN apt-get update && apt-get install -y \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# 复制项目文件
COPY requirements.txt .
COPY app.py .
COPY sha3_wasm_bg.7b9ca65ddd.wasm .
COPY templates/ templates/
# 安装Python依赖
RUN pip install --no-cache-dir -r requirements.txt
# 设置环境变量
ENV PYTHONUNBUFFERED=1
ENV HOST=0.0.0.0
ENV PORT=7860
ENV TRANSFORMERS_CACHE=/.cache/huggingface
# 设置权限
RUN chmod +x app.py
RUN chmod 755 sha3_wasm_bg.7b9ca65ddd.wasm
# 暴露端口
EXPOSE 7860
CMD ["python", "app.py"]