Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +18 -10
Dockerfile
CHANGED
|
@@ -1,23 +1,31 @@
|
|
| 1 |
-
# Use an official NVIDIA CUDA base image
|
| 2 |
FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime
|
| 3 |
|
| 4 |
-
# Set the working directory
|
| 5 |
WORKDIR /code
|
| 6 |
|
| 7 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
|
| 10 |
-
# Install dependencies
|
| 11 |
-
# --no-cache-dir ensures a smaller image size
|
| 12 |
-
# --upgrade ensures we get the latest specified versions
|
| 13 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 14 |
|
| 15 |
-
# Copy
|
| 16 |
COPY . /code/
|
| 17 |
|
| 18 |
-
#
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
-
# The command to run when the container starts
|
| 22 |
-
# This will launch your Gradio app.
|
| 23 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
# Use an official NVIDIA CUDA base image
|
| 2 |
FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime
|
| 3 |
|
| 4 |
+
# Set the working directory
|
| 5 |
WORKDIR /code
|
| 6 |
|
| 7 |
+
# [FIX] Install wget and other common utilities first
|
| 8 |
+
# Running apt-get update before install is crucial
|
| 9 |
+
RUN apt-get update && apt-get install -y wget git
|
| 10 |
+
|
| 11 |
+
# [NEW] Now, run your command to install OpenVSCode Server
|
| 12 |
+
RUN wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.86.2/openvscode-server-v1.86.2-linux-x64.tar.gz -O /tmp/openvscode-server.tar.gz && \
|
| 13 |
+
tar -xzf /tmp/openvscode-server.tar.gz -C /opt && \
|
| 14 |
+
rm /tmp/openvscode-server.tar.gz && \
|
| 15 |
+
mv /opt/openvscode-server-v1.86.2-linux-x64 /opt/openvscode-server && \
|
| 16 |
+
chown -R 1000:1000 /opt/openvscode-server
|
| 17 |
+
|
| 18 |
+
# Copy the requirements file
|
| 19 |
COPY ./requirements.txt /code/requirements.txt
|
| 20 |
|
| 21 |
+
# Install Python dependencies
|
|
|
|
|
|
|
| 22 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 23 |
|
| 24 |
+
# Copy your application files
|
| 25 |
COPY . /code/
|
| 26 |
|
| 27 |
+
# Expose the default Gradio port
|
| 28 |
EXPOSE 7860
|
| 29 |
|
| 30 |
+
# The command to run when the container starts
|
|
|
|
| 31 |
CMD ["python", "app.py"]
|