zenaight commited on
Commit ·
6082432
1
Parent(s): 384df7d
Refactor Dockerfile to remove unnecessary dependencies and installation steps
Browse files- Eliminated the installation of system dependencies `wget` and `curl`, as well as the steps for downloading and installing the VS Code Server, to streamline the Dockerfile.
- These changes aim to simplify the container setup process and reduce build time, focusing on essential components for the application.
- Dockerfile +0 -15
Dockerfile
CHANGED
|
@@ -1,22 +1,7 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
WORKDIR /code
|
| 3 |
-
|
| 4 |
-
# Install system dependencies including wget and curl
|
| 5 |
-
RUN apt-get update && apt-get install -y \
|
| 6 |
-
wget \
|
| 7 |
-
curl \
|
| 8 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
-
|
| 10 |
COPY requirements.txt .
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
-
|
| 13 |
-
# Install VS Code Server
|
| 14 |
-
RUN wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.101.2/openvscode-server-v1.101.2-linux-x64.tar.gz -O /tmp/openvscode-server.tar.gz && \
|
| 15 |
-
tar -xzf /tmp/openvscode-server.tar.gz -C /opt && \
|
| 16 |
-
rm /tmp/openvscode-server.tar.gz && \
|
| 17 |
-
mv /opt/openvscode-server-v1.101.2-linux-x64 /opt/openvscode-server && \
|
| 18 |
-
chown -R 1000:1000 /opt/openvscode-server
|
| 19 |
-
|
| 20 |
COPY . .
|
| 21 |
EXPOSE 7860
|
| 22 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
WORKDIR /code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
COPY requirements.txt .
|
| 4 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY . .
|
| 6 |
EXPOSE 7860
|
| 7 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|