Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
|
@@ -19,15 +19,18 @@ WORKDIR /app
|
|
| 19 |
# Copy the application source code to the container
|
| 20 |
COPY . /app
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
RUN
|
| 24 |
|
| 25 |
-
#
|
| 26 |
RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ -U pip \
|
| 27 |
&& pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/
|
|
|
|
|
|
|
| 28 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 29 |
|
| 30 |
-
# Make the start script executable (
|
| 31 |
RUN chmod +x start.sh
|
| 32 |
|
|
|
|
| 33 |
CMD ["./start.sh"]
|
|
|
|
| 19 |
# Copy the application source code to the container
|
| 20 |
COPY . /app
|
| 21 |
|
| 22 |
+
# (可选)创建 logs 目录并赋予写权限(如果你的项目需要写日志)
|
| 23 |
+
RUN mkdir -p /app/logs && chmod 777 /app/logs
|
| 24 |
|
| 25 |
+
# Install pip and set the PyPI mirror (Aliyun)
|
| 26 |
RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ -U pip \
|
| 27 |
&& pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/
|
| 28 |
+
|
| 29 |
+
# Install dependencies directly
|
| 30 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 31 |
|
| 32 |
+
# Make the start script executable (如果你的项目使用这个脚本来启动)
|
| 33 |
RUN chmod +x start.sh
|
| 34 |
|
| 35 |
+
# Command to run on container start
|
| 36 |
CMD ["./start.sh"]
|