File size: 1,090 Bytes
9cf7928
5f40eaa
 
9cf7928
5f40eaa
 
9cf7928
 
 
 
 
 
 
 
 
 
 
 
5f40eaa
 
9cf7928
5f40eaa
 
9cf7928
5f40eaa
 
9cf7928
5f40eaa
 
9cf7928
5f40eaa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Use an official NVIDIA CUDA base image
FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime

# Set the working directory
WORKDIR /code

# [FIX] Install wget and other common utilities first
# Running apt-get update before install is crucial
RUN apt-get update && apt-get install -y wget git

# [NEW] Now, run your command to install OpenVSCode Server
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 && \
    tar -xzf /tmp/openvscode-server.tar.gz -C /opt && \
    rm /tmp/openvscode-server.tar.gz && \
    mv /opt/openvscode-server-v1.86.2-linux-x64 /opt/openvscode-server && \
    chown -R 1000:1000 /opt/openvscode-server

# Copy the requirements file
COPY ./requirements.txt /code/requirements.txt

# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Copy your application files
COPY . /code/

# Expose the default Gradio port
EXPOSE 7860

# The command to run when the container starts
CMD ["python", "app.py"]